Terminal Games
Simple games that run in the terminal.
Loading...
Searching...
No Matches
GameInformation.hpp
1
#pragma once
2
3
#include <array>
4
#include <cstdint>
5
#include <string>
6
#include <unordered_map>
7
#include <vector>
8
9
#include "helpers/Globals.hpp"
10
15
namespace
TerminalGames
16
{
21
struct
GameInformation
22
{
26
struct
TicTacToeGameInformation
27
{
32
std::array<std::array<std::string, Globals::G_TICTACTOE_GRID_WIDTH>,
Globals::G_TICTACTOE_GRID_HEIGHT
>
m_gameGrid
;
33
std::string
m_computerSpeedName
;
34
std::string
m_currentPlayer
;
35
std::string
m_playerCount
;
36
uint32_t
m_turnCount
;
37
bool
m_hasWinner
;
39
}
40
43
m_ticTacToeGameInformation
;
44
48
struct
HangmanGameInformation
49
{
54
std::vector<char>
m_incorrectGuesses
;
55
std::string
m_computerSpeedName
;
56
std::string
m_currentGuessOfWord
;
57
std::string
m_playerCount
;
58
std::string
m_wordToBeGuessed
;
59
uint32_t
m_turnCount
;
60
char
m_currentLetterSelected
;
61
bool
m_isGameOver
;
63
}
64
67
m_hangmanGameInformation
;
68
72
struct
BattleshipsGameInformation
73
{
78
std::array<std::array<std::string, Globals::G_BATTLESHIPS_BOARD_WIDTH>,
Globals::G_BATTLESHIPS_BOARD_HEIGHT
>
m_boardPlayerOne
;
79
std::array<std::array<std::string, Globals::G_BATTLESHIPS_BOARD_WIDTH>,
Globals::G_BATTLESHIPS_BOARD_HEIGHT
>
m_boardPlayerTwo
;
80
std::unordered_map<std::string, uint32_t>
m_shipsRemainingPlayerOne
;
81
std::unordered_map<std::string, uint32_t>
m_shipsRemainingPlayerTwo
;
82
std::string
m_computerSpeedName
;
83
std::string
m_currentPlayer
;
84
std::string
m_playerCount
;
85
uint32_t
m_turnCount
;
86
bool
m_isGameOver
;
88
}
89
92
m_battleshipsGameInformation
;
93
};
94
}
TerminalGames::Globals::G_BATTLESHIPS_BOARD_HEIGHT
static const uint32_t G_BATTLESHIPS_BOARD_HEIGHT
Battleships board attributes.
Definition
Globals.hpp:1577
TerminalGames::Globals::G_TICTACTOE_GRID_HEIGHT
static const uint32_t G_TICTACTOE_GRID_HEIGHT
TicTacToe grid attributes.
Definition
Globals.hpp:395
TerminalGames
Contains all Terminal-Games objects.
TerminalGames::GameInformation::BattleshipsGameInformation
Used to package the Battleships current game state.
Definition
GameInformation.hpp:73
TerminalGames::GameInformation::BattleshipsGameInformation::m_boardPlayerOne
std::array< std::array< std::string, Globals::G_BATTLESHIPS_BOARD_WIDTH >, Globals::G_BATTLESHIPS_BOARD_HEIGHT > m_boardPlayerOne
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:78
TerminalGames::GameInformation::BattleshipsGameInformation::m_currentPlayer
std::string m_currentPlayer
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:83
TerminalGames::GameInformation::BattleshipsGameInformation::m_isGameOver
bool m_isGameOver
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:86
TerminalGames::GameInformation::BattleshipsGameInformation::m_boardPlayerTwo
std::array< std::array< std::string, Globals::G_BATTLESHIPS_BOARD_WIDTH >, Globals::G_BATTLESHIPS_BOARD_HEIGHT > m_boardPlayerTwo
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:79
TerminalGames::GameInformation::BattleshipsGameInformation::m_playerCount
std::string m_playerCount
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:84
TerminalGames::GameInformation::BattleshipsGameInformation::m_turnCount
uint32_t m_turnCount
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:85
TerminalGames::GameInformation::BattleshipsGameInformation::m_shipsRemainingPlayerOne
std::unordered_map< std::string, uint32_t > m_shipsRemainingPlayerOne
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:80
TerminalGames::GameInformation::BattleshipsGameInformation::m_shipsRemainingPlayerTwo
std::unordered_map< std::string, uint32_t > m_shipsRemainingPlayerTwo
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:81
TerminalGames::GameInformation::BattleshipsGameInformation::m_computerSpeedName
std::string m_computerSpeedName
Refer to the member data documentation in Battleships.
Definition
GameInformation.hpp:82
TerminalGames::GameInformation::HangmanGameInformation
Used to package the Hangman current game state.
Definition
GameInformation.hpp:49
TerminalGames::GameInformation::HangmanGameInformation::m_turnCount
uint32_t m_turnCount
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:59
TerminalGames::GameInformation::HangmanGameInformation::m_currentLetterSelected
char m_currentLetterSelected
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:60
TerminalGames::GameInformation::HangmanGameInformation::m_playerCount
std::string m_playerCount
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:57
TerminalGames::GameInformation::HangmanGameInformation::m_wordToBeGuessed
std::string m_wordToBeGuessed
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:58
TerminalGames::GameInformation::HangmanGameInformation::m_incorrectGuesses
std::vector< char > m_incorrectGuesses
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:54
TerminalGames::GameInformation::HangmanGameInformation::m_currentGuessOfWord
std::string m_currentGuessOfWord
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:56
TerminalGames::GameInformation::HangmanGameInformation::m_computerSpeedName
std::string m_computerSpeedName
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:55
TerminalGames::GameInformation::HangmanGameInformation::m_isGameOver
bool m_isGameOver
Refer to the member data documentation in Hangman.
Definition
GameInformation.hpp:61
TerminalGames::GameInformation::TicTacToeGameInformation
Used to package the TicTacToe current game state.
Definition
GameInformation.hpp:27
TerminalGames::GameInformation::TicTacToeGameInformation::m_turnCount
uint32_t m_turnCount
Refer to the member data documentation in TicTacToe.
Definition
GameInformation.hpp:36
TerminalGames::GameInformation::TicTacToeGameInformation::m_gameGrid
std::array< std::array< std::string, Globals::G_TICTACTOE_GRID_WIDTH >, Globals::G_TICTACTOE_GRID_HEIGHT > m_gameGrid
Refer to the member data documentation in TicTacToe.
Definition
GameInformation.hpp:32
TerminalGames::GameInformation::TicTacToeGameInformation::m_computerSpeedName
std::string m_computerSpeedName
Refer to the member data documentation in TicTacToe.
Definition
GameInformation.hpp:33
TerminalGames::GameInformation::TicTacToeGameInformation::m_currentPlayer
std::string m_currentPlayer
Refer to the member data documentation in TicTacToe.
Definition
GameInformation.hpp:34
TerminalGames::GameInformation::TicTacToeGameInformation::m_hasWinner
bool m_hasWinner
Refer to the member data documentation in TicTacToe.
Definition
GameInformation.hpp:37
TerminalGames::GameInformation::TicTacToeGameInformation::m_playerCount
std::string m_playerCount
Refer to the member data documentation in TicTacToe.
Definition
GameInformation.hpp:35
TerminalGames::GameInformation
Used by game objects to package themselves into a format that can be used by PageBuilder to construct...
Definition
GameInformation.hpp:22
TerminalGames::GameInformation::m_battleshipsGameInformation
struct TerminalGames::GameInformation::BattleshipsGameInformation m_battleshipsGameInformation
Used to package the Battleships current game state.
TerminalGames::GameInformation::m_hangmanGameInformation
struct TerminalGames::GameInformation::HangmanGameInformation m_hangmanGameInformation
Used to package the Hangman current game state.
TerminalGames::GameInformation::m_ticTacToeGameInformation
struct TerminalGames::GameInformation::TicTacToeGameInformation m_ticTacToeGameInformation
Used to package the TicTacToe current game state.
include
helpers
GameInformation.hpp
Generated on
for Terminal Games by
1.14.0