DangerNoodleJS is the classic game of Snake written for the command line in Javascript.
These instructions will get you a copy of DangerNoodleJS running on your local machine.
Use the package manager npm to install.
npm install dangernoodle
var dangerNoodle = require("dangernoodle"); // include in your own project
dangernoodle # run in bash terminal
In the terminal, use the arrow keys to control the snake. Eating a dot makes the snake grow longer. Touching the wall or the snake's body ends the game. Press Escape
, q
or Ctrl-C
anytime to exit the game.