/whackarubby

A game where you hit rubby with a hammer. DON'T HIT THE KITTEN.

Primary LanguageRuby

Whack A Rubby

A game based on Learn Game Programming With Ruby by Mark Sobkowicz.

How to Play

bundle install
ruby whackarubby.rb

Rubby is terrible, so hit the rubby with the hammer. DON'T HIT THE KITTEN. Kittens are not terrible. If you hit the kitten, you lose.

screenshot from the whack a rubby game

Get as many points as you can in 30 seconds. Each time you hit the rubby you get 5 points. Each time you miss you lose 1. If you hit the kitten you lose 50 (and the game is over).

Extra things outside the book basics

  • The kitten doesn't exist in the book version
  • The kitten and the ruby can move at different speeds. The speed is generated randomly for each one, and gets regenerated each time you play.
  • Also the speeds get faster and faster if you keep playing for longer in the same session, for an additional challenge.
  • The game keeps track of your high score as long as you don't close the window.