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 game begins with all players on the start square. It has no other function in the game.
Start is the first square listed.
Treasure squares can hold a single treasure, which is taken when the first player lands on it, or multiple treasures, one of which is taken each time a player lands on this square.
Treasures can be of either a set value, or of a random value up to a maximum.
When a player lands on a treasure square, they add the gold found on that square to their bag of gold. No other action occurs
Parameters:A square with a single treasure of 2 gold .
A square with a single treasure of 1-5 gold.
A square with 3 gold each time a player lands on it.
A square with 1-7 gold each time a player lands on it.
Teleporters have a space penalty, which the player is transported to. Space penalties can be either relative or absolute. Relative penalties are subtracted from, or added to the player's current position. If the player is on square 3 and encounters a relative penalty of -1, they go to square 2.
Absolute penalties are transporters that move the player to that absolute square. A player that hits a teleporter with absolute penalty of 0, is sent back to the start square.
Teleporters can never move a player off of the board, but they can move them either forwards or backwards.
Examples:
A one time transporter, fixed movement two squares back
A repeating transporter, fixed movement three squares forward
A one time transporter, random movement 1 to four squares forward.
A repeating transporter, random movement 1 to five squares back.
A repeating transporter, move to square 0
A one time transporter, move to square 45
Tolls are like treasures and teleporters combined. They require a player to pay gold. They have the same parameters as a treasure, with the addition of the parameters of a transporter. Tolls begin with a Y Examples:
The first player to land here must pay 5 gold or be transported back 1 square
The first player to land here must pay a random toll between 1 and 3 or be transported between -1 and -4 squares back.
Every player must pay a fixed toll of 2 gold or be transported back between -1 and -3 squares.
A player must pay 10 gold or be transported to square 5
A number of trinkets are hidden in this square. Each time a player lands on a square, they pick one up and add it to their backpack. When all trinkets have been taken, players may land on this square without a penalty. A trinket list begins with a Z, and ends with a Z.
Trinkets consist of a name, a description and a gold value.
Example:
Aladan's Castle : Z Sword : A short sword : 5 Mace : A strong mace : 10 Excalibur : The sword of King Arthur : 300 Z
There are two types of traps, time traps and event traps.
A player caught in a time trap, cannot move until a number of turns have elapsed.
A player caught in a event trap cannot move until a dice roll equal to the event occurs.
All traps have a trinket that allows a player to avoid them.
Players stuck in a trap should roll a dice. If there is only one player on the path, traps should not be active.
Traps are marked with an X.
Is an event trap, which keeps a player until a 6 is rolled, unless the player has Excalibur.
Is a time trap, which keeps the player for three turns unless the player has Sword.
Once a player reaches the castle, all trinkets are converted to their equivalent gold value, and the player waits until all other players have reached this square.
When all players reach this square, the game is over and a winner is declared.
A castle is the last square listed.
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:
20 4 18 Start : Phone Booth : S F 2 Aladan's Castle : Z Sword : A short sword : 5 Mace : A strong mace : 10 Excalibur : The sword of King Arthur : 300 Z Old Tree : S M 5 Penny Tree : R F 3 Wishing Well : R M 7 Slide : T F -2 Slip : Q F -3 Plank : T M -4 Rapid : Q M -5 Tardis : Q A 0 Book Case : T A 5 Troll's Cave : X E 6 : Excalibur Troll's Bridge : X D 3 : Sword Mud Slide : Y T F -1 F 5 Slippery Rock : Y T M -4 M 3 Monkey Gate : Y Q A 5 F 10 Castle :Note, this game is probably not playable with this board. It is an example only.
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.