|
TheCOSCGameProject
1.0
|
Manages the core gameplay of Valeris. More...
#include <valerisgame.h>
Public Member Functions | |
| ValerisGame () | |
| Constructor for the ValerisGame class. More... | |
| void | start (const std::string &color) |
| Starts the game. More... | |
Manages the core gameplay of Valeris.
The ValerisGame class is responsible for initializing the game, managing the player and dungeon, and handling the game's main loop.
| ValerisGame::ValerisGame | ( | ) |
Constructor for the ValerisGame class.
Initializes the player, dungeon, and other game-related entities.
Initializes the game by generating a dungeon floor with a specified number of rooms and setting the current room to the starting point.
< Sets the number of rooms in the dungeon.
< Generates the dungeon floor and sets the starting room.
| void ValerisGame::start | ( | const std::string & | color | ) |
Starts the game.
Starts the game and manages the main exploration loop.
| color | the color of the text |
This method begins the game loop, allowing the player to explore the dungeon and interact with the environment.
The start method enters a loop where the player explores the dungeon, moves between rooms, and interacts with the game world. The player can move in cardinal directions, engage in combat, play games, or view help information.
< Flag to control the exploration loop.
< Gets the player's input for movement or action.
< Move the player to the room to the north.
< Move the player to the room to the south.
< Move the player to the room to the east.
< Move the player to the room to the west.
< Starts the NPC's gambling game if the current room is a gambling room.
< Initiates combat with the enemy.
< Exits the exploration loop and ends the game.
< Exits the exploration loop and ends the game.
< Displays help information from a file.
1.8.13