Simon Retrospective

Intro

The Simon project is a digital recreation of the classic 1980's game Simon. I remember playing Simon at my cousin's house every time we went to visit, though I don't remember that we every owned our own Simon game.

Recreating this game that I have strong childhood memories of was a lot of fun. I do remember having lots of issues getting the layout just right due to the odd circular shape and also trying to get the controls area overlaid just right.

Code Review

The HTML here is still a Bootstrap layout. I used responsive column sizes to great effect here. My Simon game looks great at any browser width and on my mobile phone. I remember lots of frustration getting the controls box to be just where I wanted it and also not have the words run off into the colored cells.

The JavaScript is much nicer than the code for Tic Tac Toe was. Basically, I used an array of the computer's randomized moves, and compared it against an array of the player's moves. If, after looping through those two arrays, they were both equal, the round was incremented and the computer replayed its entire array of moves plus an additional new move. I showed a basic understanding of passing around function arguments. I am still using jQuery here and the code could be refactored to be more concise and efficient though.

Future Improvements

I am considering rewriting this game in Angular. I think working on testing it with Jasmine would be great practice. Some other things that could be improved:

  • Again, remove Bootstrap and do this with something simpler like flexbox
  • Remove jQuery and just use Angular
  • Rather than using loops, I could use JavaScript array methods like forEach()