Please help me create a cave class for a Hunt the Wumpus game. You can read the rules in it's entirety of the Hunt the Wumpus game online to get a better idea of the specifications. It's an actual game. INFORMATION: The object of this game is to find and kill the Wumpus within a minimum number of moves, before you get exhausted or run out of arrows. There is only one way to win: you must discover which room the Wumpus is hiding in and kill it by shooting an arrow into that room from an adjacent room. The Cave The Wumpus lives in a cave of 30 rooms. The rooms are hexagonal. Each room has up to 3 tunnels, allowing access to 1, 2 or 3 (out of 6) adjacent rooms. The attached diagram shows the layout of rooms in the cave. The map wraps around such that rooms on the edges (white cells) have neighbors from the opposite edge (blue cells). E.g., the neighbors of room 1 are rooms 25, 26, 2, 7, 6, and 30, and you could choose to connect room 1 to any of these rooms. Observe how room 1 appears in 4 places in the diagram, due to the wrap-around. The Cave Object keeps track of the cave, including data that describes the “connectivity information” for adjacent rooms. Adjacent rooms may either be connected by way of a tunnel, or not connected at all (separated by a wall). The tasks it performs are as follows: Read and parse cave data from a file Keeps an internal data representation of the cave sufficient for representing connections for each room in the cave Exposes appropriate methods and/or attributes for other objects and the main program of the Hunt The Wumpus game. The other objects are as follows: High Score object: Manages the high scores (including saving high scores and displaying a high score scoreboard). Trivia object: Manages the trivia questions for the game (including asking questions and loading questions from a file). GameLocations object: Keeps track of the locations of the player, the Wumpus, and the hazards. Also handles Wumpus movements unless there’s a separate Wumpus object. Player object: Keeps track of the player’s inventory and score. (This could be done by the same person doing the GameLocations object). Cave object: Keeps track of which rooms in the cave are connected to which other rooms. Graphical Interface object: Displays the state of the current game (the current room, connected rooms, inventory, etc.). Game Control object: Handles events reported by the Graphical Interface, coordinates all the other parts of the game.
Please help me create a cave class for a Hunt the Wumpus game. You can read the rules in it's entirety of the Hunt the Wumpus game online to get a better idea of the specifications. It's an actual game.
INFORMATION:
The object of this game is to find and kill the Wumpus within a minimum number of moves, before you get exhausted or run out of arrows. There is only one way to win: you must discover which room the Wumpus is hiding in and kill it by shooting an arrow into that room from an adjacent room.
The Cave
The Wumpus lives in a cave of 30 rooms. The rooms are hexagonal. Each room has up to 3 tunnels, allowing access to 1, 2 or 3 (out of 6) adjacent rooms. The attached diagram shows the layout of rooms in the cave. The map wraps around such that rooms on the edges (white cells) have neighbors from the opposite edge (blue cells). E.g., the neighbors of room 1 are rooms 25, 26, 2, 7, 6, and 30, and you could choose to connect room 1 to any of these rooms. Observe how room 1 appears in 4 places in the diagram, due to the wrap-around.
The Cave Object keeps track of the cave, including data that describes the “connectivity information” for adjacent rooms. Adjacent rooms may either be connected by way of a tunnel, or not connected at all (separated by a wall). The tasks it performs are as follows:
- Read and parse cave data from a file
- Keeps an internal data representation of the cave sufficient for representing connections for each room in the cave
- Exposes appropriate methods and/or attributes for other objects and the main program of the Hunt The Wumpus game.
The other objects are as follows:
- High Score object: Manages the high scores (including saving high scores and displaying a high score scoreboard).
- Trivia object: Manages the trivia questions for the game (including asking questions and loading questions from a file).
- GameLocations object: Keeps track of the locations of the player, the Wumpus, and the hazards. Also handles Wumpus movements unless there’s a separate Wumpus object.
- Player object: Keeps track of the player’s inventory and score. (This could be done by the same person doing the GameLocations object).
- Cave object: Keeps track of which rooms in the cave are connected to which other rooms.
- Graphical Interface object: Displays the state of the current game (the current room, connected rooms, inventory, etc.).
- Game Control object: Handles events reported by the Graphical Interface, coordinates all the other parts of the game.
Right now I just want code for the Cave class/object.
Step by step
Solved in 3 steps with 1 images