My 7 year old daughter and 6 year old son thought it would be cool if we started making some games. I decided that I would teach them to program through some really simple games that they thought would be fun. The first one we thought of was the number_guesser game. They've been playing it a lot and seem to really enjoy figuring out how to make it work and playing it.
##How to Play The Games##
You will need to bundle when you first try to play this game as it
requires the IO class so it can have hidden input for "correct" number.
After you have bundled then run the guess.rb
file to get started. The
prompts should provide good detail for you to play.
To use this just go to the picker.rb
file and enter the participant's
names in the array. Then enter the number of people in the array as the
argument to rand
.
Really simple way to show kids what an array is and what the rand method can do. Fun way to solve a simple problem with software for kids.
I am very open to people adding more games that they make with their kids or just games that they think it might be fun for kids to play. Just submit a pull request. Because I want young kids to be able to play these games their execution must be rather simple. Keep that in mind when writing the games.
Also, I haven't written tests for any of this yet but tests really help when submitting and accepting pull requests. Write some tests if you would like.