Week 3 — Rock, Paper, Scissors

This week has been on point. We've moved from programs that only live on the command line to making web applications, hooray! It's unbelievably satisfying building something concrete to show to my non-coding friends, rather than some strange, abstract Ruby thing that requires decent knowledge of the command line and irb.

The weekend challenge was to create a fully test-driven, neatly encapsulated, object-orientated game of Rock, Paper, Scissors. Once I got the bare-bones functioning game with all the unit and feature tests down, I was in my element as a front-end developer, making it look cool. I started off with an embarrassing storyboard drawing:

attempt at storyboarding
Can you believe I got an A* in GCSE Art? 🎨

I wanted a short time-lapse animation of the hands gesturing for each move, so I roped in my boyfriend for a couple of hours to help me take and edit a bunch of photos.

Example spritesheet

The animations work by sliding a spritesheet, one frame at a time, through a narrow container — like a film reel projector.

I had a lot of fun with this challenge. It was pretty much complete by the end of Saturday, so I spent the evening tidying my code with G&Ts in hand. I had friends over, but they didn't seem to mind me working, luckily!

final game
Voilà — Rock, Paper, Sizzle!

And here is the finished product. It's hosted on a free Heroku package, which means it takes a while to wake up if it hasn't been viewed for a while. Be patient!

As for the silly player 2 names... Well, what is code without a little bit of whimsy?