Did you know that you can navigate the posts by swiping left and right?

Simon color game in Bash

26 Mar 2017 . category: projects . Comments
#bash #linux #game

This project was my first attempt to make a game in Bash. I wanted to become more comfortable with different coding styles and larger logic chains, so I decided to recreate a popular memory game in the terminal. In the game ‘Simon’, you are presented with a circle split up into 4 separate color regions. In my version I elected to utilize terminal clearing to make the illusion of animation.

The user is given a description of the game, then they’re given 1.5 seconds to memorize the colors on the screen. After the seconds are up the user must type in the colors he remembers in either full-word or first-letter format. The game also keeps a high score system, writing the highest score to a file ~/.simonHS and comparing it against the current score.

Here’s the code.


I'm currently studying Computer Informational Systems at Baruch College. I love web development and creating useful, exciting things.