play-snake

CLI Snake in a functional style.

Usage no npm install needed!

<script type="module">
  import playSnake from 'https://cdn.skypack.dev/play-snake';
</script>

README

snake

CLI Snake in a functional style.

Instructions

Try to eat as many apples as possible without dying. You die by either colliding with the walls or yourself.

Controls

wasd hjkl or the arrow keys.

How to use

Install

npm install -g play-snake

Play

Run snake followed by arguments.

Size (min: 3) [Integer]

snake <size>

or :

  1. Number of columns (min: 3) [Integer]
  2. Number of rows (min: 3) [Integer]
snake <cols> <rows>

Options:

-b Play a black and white version of the game
-h Help
-i Game instruction