TheCOSCGameProject  1.0
Functions
menu.h File Reference

Provides functions for managing the game menu and related actions. More...

#include <iostream>
#include <vector>
#include <string>
#include <iomanip>
Include dependency graph for menu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void displayIntro (int delayTime, const std::string &color)
 Displays the introductory text for the game. More...
 
void Displayj ()
 Displays the game menu. More...
 
void StartGame (const std::string &color)
 Starts a new game. More...
 
void LoadSavedGame ()
 Loads a saved game. More...
 
void DisplayInstructionsText ()
 Displays the game instructions. More...
 
void Accessiblity (int &delayTime, std::string &color)
 Manages accessibility options. More...
 
std::string getColor (int colorChoice, const std::string &color)
 Get color from user for menu. More...
 
void DisplayOption ()
 

Detailed Description

Provides functions for managing the game menu and related actions.

This file contains declarations for functions that handle the display of the game's introductory text, the main menu, game instructions, and accessibility options. It also includes functions for starting a new game and loading a saved game.

Function Documentation

◆ Accessiblity()

void Accessiblity ( int &  delayTime,
std::string &  color 
)

Manages accessibility options.

Parameters
delayTimeReference to the time delay between each printed character in milliseconds.
colorReference to the color code for the text.

This function allows the player to adjust accessibility settings, such as text color and delay time for text display.

Manages accessibility options.

Parameters
delayTimeReference to the delay time between printing each character.
colorReference to the color code for the text.

This function allows the player to adjust text speed and color for better accessibility. Changes are applied immediately, and the player can return to the main menu at any time.

◆ DisplayInstructionsText()

void DisplayInstructionsText ( )

Displays the game instructions.

This function shows the instructions on how to play the game, including controls and objectives.

Displays the game instructions.

This function prints the instructions for playing the Valeris game and waits for the user to press Enter before clearing the screen.

◆ displayIntro()

void displayIntro ( int  delayTime,
const std::string &  color 
)

Displays the introductory text for the game.

Parameters
delayTimeThe time delay between each printed character in milliseconds.
colorThe color code for the text.

Displays the introductory text for the game.

Parameters
delayTimeThe delay time between printing each character.
colorThe color code for the text.

The introduction is read from a file and printed with a delay and color for dramatic effect.

◆ Displayj()

void Displayj ( )

Displays the game menu.

This function shows the main menu of the game, allowing the player to choose between starting a new game, loading a saved game, viewing instructions, or accessing the accessibility options.

Displays the game menu.

This function displays the main menu with options for starting a new game, loading a saved game, viewing instructions, adjusting accessibility settings, or exiting the game.

◆ DisplayOption()

void DisplayOption ( )

◆ getColor()

std::string getColor ( int  colorChoice,
const std::string &  color 
)

Get color from user for menu.

Parameters
colorChoicethe color choice the user chose.
colorReference to the old color code for the text.

This function allows the player to select and change the color of the text

◆ LoadSavedGame()

void LoadSavedGame ( )

Loads a saved game.

This function retrieves and resumes a previously saved game session.

Loads a saved game.

This function simulates loading a saved game. The actual loading functionality is not implemented.

◆ StartGame()

void StartGame ( const std::string &  color)

Starts a new game.

Parameters
colorThe color of the text

This function initializes a new game session, setting up the necessary game state.

Starts a new game.

This function creates an instance of the ValerisGame class and begins the game.