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
15namespace TerminalGames
16{
22 {
27 {
32 std::array<std::array<std::string, Globals::G_TICTACTOE_GRID_WIDTH>, Globals::G_TICTACTOE_GRID_HEIGHT> m_gameGrid;
34 std::string m_currentPlayer;
35 std::string m_playerCount;
36 uint32_t m_turnCount;
39 }
40
44
64
68
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;
83 std::string m_currentPlayer;
84 std::string m_playerCount;
85 uint32_t m_turnCount;
88 }
89
93 };
94}
static const uint32_t G_BATTLESHIPS_BOARD_HEIGHT
Battleships board attributes.
Definition Globals.hpp:1577
static const uint32_t G_TICTACTOE_GRID_HEIGHT
TicTacToe grid attributes.
Definition Globals.hpp:395
Contains all Terminal-Games objects.
Used to package the Battleships current game state.
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.
std::string m_currentPlayer
Refer to the member data documentation in Battleships.
bool m_isGameOver
Refer to the member data documentation in Battleships.
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.
std::string m_playerCount
Refer to the member data documentation in Battleships.
uint32_t m_turnCount
Refer to the member data documentation in Battleships.
std::unordered_map< std::string, uint32_t > m_shipsRemainingPlayerOne
Refer to the member data documentation in Battleships.
std::unordered_map< std::string, uint32_t > m_shipsRemainingPlayerTwo
Refer to the member data documentation in Battleships.
std::string m_computerSpeedName
Refer to the member data documentation in Battleships.
Used to package the Hangman current game state.
uint32_t m_turnCount
Refer to the member data documentation in Hangman.
char m_currentLetterSelected
Refer to the member data documentation in Hangman.
std::string m_playerCount
Refer to the member data documentation in Hangman.
std::string m_wordToBeGuessed
Refer to the member data documentation in Hangman.
std::vector< char > m_incorrectGuesses
Refer to the member data documentation in Hangman.
std::string m_currentGuessOfWord
Refer to the member data documentation in Hangman.
std::string m_computerSpeedName
Refer to the member data documentation in Hangman.
bool m_isGameOver
Refer to the member data documentation in Hangman.
Used to package the TicTacToe current game state.
uint32_t m_turnCount
Refer to the member data documentation in TicTacToe.
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.
std::string m_computerSpeedName
Refer to the member data documentation in TicTacToe.
std::string m_currentPlayer
Refer to the member data documentation in TicTacToe.
bool m_hasWinner
Refer to the member data documentation in TicTacToe.
std::string m_playerCount
Refer to the member data documentation in TicTacToe.
Used by game objects to package themselves into a format that can be used by PageBuilder to construct...
struct TerminalGames::GameInformation::BattleshipsGameInformation m_battleshipsGameInformation
Used to package the Battleships current game state.
struct TerminalGames::GameInformation::HangmanGameInformation m_hangmanGameInformation
Used to package the Hangman current game state.
struct TerminalGames::GameInformation::TicTacToeGameInformation m_ticTacToeGameInformation
Used to package the TicTacToe current game state.