This exercise is based on the American Computer Science League - Intermediate Division, Contest #1, 1989-90.
-
The board game GameLand is a very simple one that you will simulate on the computer.
-
Two players begin the game on a square labeled as “START.” The goal of the game is to be the first player to reach the square labeled “FINISH.” There are 100 squares between START and FINISH.
-
The two players take turns rolling two six-sided dice. A roll of 2 or 12 means that the player loses that turn and cannot move. Getting a roll of 7 means that the player moves backwards 7 spaces (but not beyond START). On all other rolls, the players must move forward an amount equal to the number of the roll.
-
If one player lands on a square occupied by the other player, the player originally on that square gets bumped back to the START square.
-
The game ends when one player wins by landing on or beyond the FINISH square.