Project 2: Gary's Great Getaway

The game of Gary's Great Getaway is played by a number of players walking down a trail. As they go, they encounter traps, treasures, trolls and trinkets. By collecting treasures, using trinkets to defeat trolls, and treading lightly on traps, a clever player can win the game.

To play the game, each player rolls a dice and advances down the trail that number of squares. Each square (as described below) has an encounter that the player must face. The game continues until all players reach the castle and trade in their trinkets for gold. The winner is declared to be the player with the greatest amount of gold. Each square can have a name. This is always specified first. There are seven basic types of squares:

The players in the game have a bag of gold, a treasure list (Backpack) and a name.

Upon starting, the program should ask the user for the name of a game file. It should open this file and load a board.

The file format is as follows:

After the board is loaded, you should ask the player for the number of players and the name of each.

Each player in turn, rolls the dice, moves to a square, interacts with the square, and possibly transports to new square. Players transported to a new square should interact with that square, and possibly be transported to an additional square. This can continue many times, but will eventually end. Consider the board:

Start:
Phone Booth : S F 2
Slide 1: T F -2
Old Tree : S M 5
Slide 2 : T F -2
Aladan's Castle : Z
Sword : A short sword : 5
Mace : A strong mace : 10
Excalibur : The sword of King Arthur : 300
Z
Slide 3 : T F -2
Old Tree : S M 5
Slide 4 : T F -2
Castle:
A player landing on square 8 (Slide 4) will slip back to Slide 3, then to Slide 2, Slide 1 and finally to Start. (What a crummy game!)

You should inform the player what is happening on each turn. Here is an example run:

Welcome to Gary's Great Getaway
   What file do you wish to load?  sample.game
   Loading sample.game
   How many players? 2
   Enter Player 1's name: Bob
   Enter Player 2's name: Wendy
   Here we go:

   Bob: You are on the Start.
        You roll a 3.
	You land on Old Tree.
	This pays you 5 gold, you now have 25 gold.
   Wendy: You are on Start.
          You roll an 8.
	  You land on Slide 4.
	  This slides you back 2.
	  You land on Slide 3.
	  This slides you back 2.
	  You land on Slide 2.
	  This slides you back 2.
	  You land on Slide 1.
	  This slides you back 2.
	  You Land on Start.
   Bob: You are on Old Tree.
        You roll a 2.
	You land on Aladan's Castle
	You pick up Sword.
	You now have: Sword.
   Wendy: You are on Start.
          You roll a 5.
	  You land on Aladan's Castle
	  You pick up Mace.
	  You now have: Mace.
   Bob: You are on Aladan's Castle
        You roll a 4.
	You land on Castle
	You sell Sword for 5 gold.
	You have 30 gold. 
   Wendy: You are on Aladan's Castle
          You roll a 2
	  You land on  Old Tree
	  This pays you 10 gold, you now have 30 gold.
   Wendy: You are on Old Tree 
          You roll a 2
	  You sell Mace for 10 gold.
	  You have 40 gold. 
   Game Over  Wendy Wins with 40 Gold
          Other Players:
            Bob 30 Gold
              

At the end of the game, a winner should be printed.

In addition a list of other players should be printed, in descending order of gold.

You should modify the list class with the following operation:

ItemType FirstItem() 
This will remove the first item from the list and return it to the calling procedure.