In this assignment students work either individually or in pairs to create the game Nim. Nim is a game in which two players take turns removing stones from piles with the goal of forcing the other player to take the last stone. Students must program the game from the ground up, creating their own decomposition design, as well as error checking user input. This assignment requires students to think carefully about design, documentation, and debugging. It is particularly useful for students who need practice writing larger programs.
Integrate pair programming when it is appropriate for students to collaborate on a lab, assignment, or project. The “driver” controls the mouse and the keyboard, while the “navigator” makes suggestions, points out errors, and asks questions. Partners routinely switch roles to gain the benefits of each role.
This material uses a game that students are familiar with to Employ Meaningful and Relevant Content.