Rules
In our variation of Nim, the game board consists of three rows of rocks. Row A contains 3 rocks, Row B contains 5 rocks, and Row C contains 8 rocks.
The rules are as follows:
What to do
ROW A: ooo ROW B: ooooo ROW C: oooooooo
Player 1, choose a row and number of rocks:
Player 1, choose a row and number of rocks: D4 Invalid move. Try again. Player 1, choose a row and number of rocks: A9 Invalid move. Try again. Player 1, choose a row and number of rocks: A* Invalid move. Try again. Player 1, choose a row and number of rocks: &4 Invalid move. Try again. Player 1, choose a row and number of rocks:Your program should keep prompting the player until a valid move is chosen. Be sure your program echoes the player's move to the screen as they type it. After you have echoed the player's move, you should output a newline character (ASCII code x000A) to move the cursor to the next line.
Player 1 Wins.
Sample Input/Output
An example of the input/output for a game being played can be found here. To receive full credit for your
program, your input/output format MUST EXACTLY MATCH the format in the
example.
Hints and Suggestions