Code in Place 2021 Project
I wanted to work on refactoring, expanding on a simple idea, and exploring a theme with variations, so I took a game that was introduced in Code in Place and developed it into three different versions. Phase 2 will be to turn this into a Grade 6-12 coding club curriculum … so stay tuned!
One of the projects we did after moving on from Karel was to code a console version of the game of Nimm. Getting started, I checked out Wikipedia to learn a little bit about the history of the game. Nimm (also known as Nim) is a little bit like football (soccer), in that it was pretty much inevitable and has dozens of origin stories, and there are numerous variations on the them. It's played everywhere and by everyone.
And my final project is sort of the same thing. I took the first version that we did in class and I added some graphics to it. Nothing special, just a representation of the pile that gets smaller as stones are taken from the pile.
Note: There's a README.md for each of these programs, which goes into how I framed the problem and the requirements, assumptions, and stretch goals for each of them.
Then I made a second version which lets one player play against a computer.
Ancient Game of Nimm V2
The third version plays the game using a different set of rules. Instead of drawing stones from one pile, players can take from one of numerous piles, but can only take from one pile at a time. This game would not make any sense without a graphic presentation of the current state of the piles, so I used Lists to add and delete a stone emoji to represent game play.