Calculator cricket for ruby!
This game solely relies on luck. It utilises the .sample
method to simulate a real cricket game.
I built this game to get some practice with Ruby, and drive home some core programming fundamentals.
The idea of the game came from high school, we used to play this game on our calculators when lessons were boring. I added a few other features which couldn’t be emulated on a calculator at the time. These included: individual player scores and a visual score card emulated from an old school teletext page.
ruby calculator-cricket.rb