Skip to content

Instantly share code, notes, and snippets.

@zgulde
Last active August 18, 2016 15:05
Show Gist options
  • Save zgulde/8fcccf1337b9f6d3983b to your computer and use it in GitHub Desktop.
Save zgulde/8fcccf1337b9f6d3983b to your computer and use it in GitHub Desktop.

Simple Simon for the command line!

Check out this gist for the code!

Simple installation

This simple simon is written in javascript and designed for the command line, so you must have node installed to run it.

Note for all codeup students: your vagrant box totally has node already installed.

There are a number of ways to get my code on your system, you could copy and paste and save the code somewhere, or run this command

curl https://gist.githubusercontent.com/zgulde/54e91f1d53ccc3419e91/raw/6da582cec9113e0389c17ce3464f718d757fa68f/simon.js > simon.js

This will create a file named simon.js in whatever directory you run it from.

To run the game, just type

node simon.js

For simplicity's sake the command below will both download and run the simon.js script.

curl https://gist.githubusercontent.com/zgulde/54e91f1d53ccc3419e91/raw/6da582cec9113e0389c17ce3464f718d757fa68f/simon.js > simon.js && node simon.js

Note that if you run the above command, to later play the game don't rerun the above command, but just type

node simon.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment