Terminal Games
Simple games that run in the terminal.
Loading...
Searching...
No Matches
TerminalGames::Globals Namespace Reference

Contains all global and constant objects. More...

Namespaces

namespace  Exceptions
 Contains all custom exceptions.

Enumerations

enum class  Colours : std::uint8_t { WHITE = 0 , RED , BLUE , GREEN , YELLOW , RESET }
 Colours representing ANSI escape codes. More...

Functions

template<typename T, typename U>
static constexpr T ImplementStdRangesFind (const T &p_begin, const T &p_end, const U &p_value)
 Implements std::ranges::find which should work for all standard template library containers.
template<typename T, typename U>
static constexpr int32_t ImplementStdCount (const T &p_begin, const T &p_end, const U &p_value)
 Implements std::count which it should work for all standard template library containers.
static std::string RepeatString (const uint32_t &p_numberOfRepetitions, const std::string &p_stringToRepeat)
 Repeats p_stringToRepeat for a total of p_numberOfRepetitions number of times.
static constexpr void RemoveSubString (std::string &p_string, const std::string &p_subString)
 Removes in-place all instances of a p_subString from p_string .

Variables

static const bool G_PLATFORM_IS_WINDOWS = false
 Used by PageBuilder to display the current platform being used and used by Terminal to decided whether to use <Windows.h> for enhanced user input.
static const std::string G_MAIN_MENU_CLI_HELP_MESSAGE = "\nUsage: terminal-games [options]\n\nOPTIONS:\n\nGeneric Options:\n\n -h --help Display available options.\n\nOptional Options:\n\n --a --ascii-only Only use extended ASCII characters (this removes all colour).\n\n"
 CLI help message.
static const uint32_t G_TERMINAL_CURSOR_WIDTH_PERCENTAGE = 100
 The cursor width while running on windows.
static const uint32_t G_TICTACTOE_MAXIMUM_ERROR_COUNT = G_TICTACTOE_GRID_WIDTH * G_TICTACTOE_GRID_HEIGHT
 TicTacToe maximum errors count to determine whether the game is over.
static const uint32_t G_HANGMAN_KEY_PRESS_CHAR_OFFSET = 32
 Hangman value to minus from key press to get char representation.
static const uint32_t G_HANGMAN_MAXIMUM_ERROR_COUNT = 10
 Hangman maximum errors count to determine whether the game is over.
static const uint32_t G_BATTLESHIPS_SHIP_COUNT = 5
 Battleships number of ships for each board/player.
static const std::array< std::string, G_BATTLESHIPS_SHIP_COUNTG_BATTLESHIPS_SHIP_INSTRUCTIONS
 Battleships list of instructions use when asking the user for the grid locations for their ships.
static const std::array< std::string, G_BATTLESHIPS_SHIP_COUNTG_BATTLESHIPS_SHIP_NAMES
 Battleships list of ship names.
static const std::array< std::string, G_BATTLESHIPS_SHIP_COUNTG_BATTLESHIPS_SHIP_PLACED_NAMES
 Battleships list of ship names when placed on a board.
static const std::array< uint32_t, G_BATTLESHIPS_SHIP_COUNTG_BATTLESHIPS_SHIP_SIZES
 Battleships list of ship sizes.
static const char G_PAGE_HORIZONTAL_LINE = static_cast<char>(205)
 Extended ASCII characters for edges and corners of the page.
static const char G_PAGE_VERTICAL_LINE = static_cast<char>(186)
 Extended ASCII characters for edges and corners of the page.
static const char G_PAGE_TOP_RIGHT_CORNER = static_cast<char>(187)
 Extended ASCII characters for edges and corners of the page.
static const char G_PAGE_BOTTOM_RIGHT_CORNER = static_cast<char>(188)
 Extended ASCII characters for edges and corners of the page.
static const char G_PAGE_BOTTOM_LEFT_CORNER = static_cast<char>(200)
 Extended ASCII characters for edges and corners of the page.
static const char G_PAGE_TOP_LEFT_CORNER = static_cast<char>(201)
 Extended ASCII characters for edges and corners of the page.
static const char G_PAGE_GRID_HORIZONTAL_LINE = static_cast<char>(196)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_VERTICAL_LINE = static_cast<char>(179)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_INTERSECTION = static_cast<char>(197)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_UPSIDE_DOWN_T = static_cast<char>(193)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_T = static_cast<char>(194)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_LEFT_SIDEWAYS_T = static_cast<char>(195)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_RIGHT_SIDEWAYS_T = static_cast<char>(180)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_TOP_LEFT = static_cast<char>(218)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_TOP_RIGHT = static_cast<char>(191)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_BOTTOM_LEFT = static_cast<char>(192)
 Extended ASCII characters for grids.
static const char G_PAGE_GRID_BOTTOM_RIGHT = static_cast<char>(217)
 Extended ASCII characters for grids.
static const char G_PAGE_CENTRAL_DOT = static_cast<char>(250)
 Misc extended ASCII characters.
static const char G_PAGE_LIGHT_HASH = static_cast<char>(176)
 Misc extended ASCII characters.
static const char G_PAGE_DARK_HASH = static_cast<char>(178)
 Misc extended ASCII characters.
static const uint32_t G_PAGE_MINIMUM_LEFT_VERTICAL_LINE_SIZE = 1
 Minimum padding amounts.
static const uint32_t G_PAGE_MINIMUM_LEFT_PADDING_SIZE = 1
 Minimum padding amounts.
static const uint32_t G_PAGE_MINIMUM_RIGHT_PADDING_SIZE = 1
 Minimum padding amounts.
static const uint32_t G_PAGE_MINIMUM_RIGHT_VERTICAL_LINE_SIZE = 1
 Minimum padding amounts.
static const std::string G_PAGE_OPTION_SELECTOR = ">"
 For when highlighting what is currently selected in an option menu.
static const std::string G_PAGE_OPTION_SELECTOR_ABSENT_PADDING = std::string(Globals::G_PAGE_OPTION_SELECTOR.size() + 1, ' ')
 For when highlighting what is currently selected in an option menu.
static const uint32_t G_PAGE_ANSI_COLOUR_ESCAPE_CODE_COUNT = 6
 ANSI colour escape codes to add colour to output.
static const uint32_t G_PAGE_ANSI_COLOUR_ESCAPE_CODE_SIZE = 7
 ANSI colour escape codes to add colour to output.
static const char G_PAGE_ANSI_COLOUR_ESCAPE_CODE_START = '\x1B'
 ANSI colour escape codes to add colour to output.
static const std::string G_PAGE_ANSI_WHITE_COLOUR_ESCAPE_CODE = "\x1B[1;37m"
 ANSI colour escape codes to add colour to output.
static const std::string G_PAGE_ANSI_RED_COLOUR_ESCAPE_CODE = "\x1B[1;31m"
 ANSI colour escape codes to add colour to output.
static const std::string G_PAGE_ANSI_BLUE_COLOUR_ESCAPE_CODE = "\x1B[1;34m"
 ANSI colour escape codes to add colour to output.
static const std::string G_PAGE_ANSI_GREEN_COLOUR_ESCAPE_CODE = "\x1B[1;32m"
 ANSI colour escape codes to add colour to output.
static const std::string G_PAGE_ANSI_YELLOW_COLOUR_ESCAPE_CODE = "\x1B[1;33m"
 ANSI colour escape codes to add colour to output.
static const std::string G_PAGE_ANSI_RESET_COLOUR_ESCAPE_CODE = "\x1B[0m"
 ANSI colour escape codes to add colour to output.
static const std::array< std::string, G_PAGE_ANSI_COLOUR_ESCAPE_CODE_COUNTG_PAGE_ANSI_ALL_COLOUR_ESCAPE_CODES
static const std::string G_HOMEPAGE_TOP_TITLE = "Terminal Games"
 Page attributes for the homepage.
static const std::string G_HOMEPAGE_BOTTOM_TITLE = "q = quit program"
 Page attributes for the homepage.
static const uint32_t G_HOMEPAGE_DISPLAY_WIDTH = 40
 Page attributes for the homepage.
static const uint32_t G_HOMEPAGE_DISPLAY_HEIGHT = 20
 Page attributes for the homepage.
static const std::string G_MAIN_MENU_TOP_TITLE = "Main Menu"
 Page attributes for the MainMenu page.
static const std::string G_MAIN_MENU_BOTTOM_TITLE = "q = quit to homepage"
 Page attributes for the MainMenu page.
static const uint32_t G_MAIN_MENU_DISPLAY_WIDTH = 32
 Page attributes for the MainMenu page.
static const uint32_t G_MAIN_MENU_DISPLAY_HEIGHT = 13
 Page attributes for the MainMenu page.
static const std::string G_TICTACTOE_TOP_TITLE = "Tic Tac Toe"
 Page attributes for all TicTacToe pages.
static const std::string G_TICTACTOE_BOTTOM_TITLE = "q = show quit menu"
 Page attributes for all TicTacToe pages.
static const uint32_t G_TICTACTOE_DISPLAY_WIDTH = 57
 Page attributes for all TicTacToe pages.
static const uint32_t G_TICTACTOE_DISPLAY_HEIGHT = 19
 Page attributes for all TicTacToe pages.
static const std::string G_HANGMAN_TOP_TITLE = "Hangman"
 Page attributes for all Hangman pages.
static const std::string G_HANGMAN_BOTTOM_TITLE = "q = show quit menu"
 Page attributes for all Hangman pages.
static const uint32_t G_HANGMAN_DISPLAY_WIDTH = 62
 Page attributes for all Hangman pages.
static const uint32_t G_HANGMAN_DISPLAY_HEIGHT = 22
 Page attributes for all Hangman pages.
static const std::string G_BATTLESHIPS_TOP_TITLE = "Battleships"
 Page attributes for all Battleships pages.
static const std::string G_BATTLESHIPS_BOTTOM_TITLE = "q = show quit menu"
 Page attributes for all Battleships pages.
static const uint32_t G_BATTLESHIPS_DISPLAY_WIDTH = 142
 Page attributes for all Battleships pages.
static const uint32_t G_BATTLESHIPS_DISPLAY_HEIGHT = 38
 Page attributes for all Battleships pages.
static const uint32_t G_QUIT_MENU_RESTART_GAME_INDEX = 0
 Quit menu options.
static const uint32_t G_QUIT_MENU_RESET_GAME_INDEX = 1
 Quit menu options.
static const uint32_t G_QUIT_MENU_QUIT_GAME_INDEX = 2
 Quit menu options.
static const uint32_t G_QUIT_MENU_QUIT_MAIN_MENU_INDEX = 3
 Quit menu options.
static const uint32_t G_QUIT_MENU_QUIT_PROGRAM_INDEX = 4
 Quit menu options.
static const uint32_t G_QUIT_MENU_CANCEL_INDEX = 5
 Quit menu options.
static const std::vector< std::string > G_QUIT_MENU_OPTIONS
 Quit menu options.
static const uint32_t G_TERMINAL_ENTER_KEY = '\r'
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_BACKSPACE_KEY = 8
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_UP_ARROW_KEY = 72
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_DOWN_ARROW_KEY = 80
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_LEFT_ARROW_KEY = 75
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_RIGHT_ARROW_KEY = 77
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_QUIT_KEY = 'q'
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_RESTART_KEY = 'r'
 Keyboard values when getting user input on Windows.
static const uint32_t G_TERMINAL_ALTERNATIVE_ENTER_KEY = 'e'
 Keyboard values when getting user input other platforms.
static const uint32_t G_TERMINAL_ALTERNATIVE_BACKSPACE_KEY = 'z'
 Keyboard values when getting user input other platforms.
static const uint32_t G_TERMINAL_ALTERNATIVE_UP_ARROW_KEY = 'w'
 Keyboard values when getting user input other platforms.
static const uint32_t G_TERMINAL_ALTERNATIVE_DOWN_ARROW_KEY = 's'
 Keyboard values when getting user input other platforms.
static const uint32_t G_TERMINAL_ALTERNATIVE_LEFT_ARROW_KEY = 'a'
 Keyboard values when getting user input other platforms.
static const uint32_t G_TERMINAL_ALTERNATIVE_RIGHT_ARROW_KEY = 'd'
 Keyboard values when getting user input other platforms.
static const uint32_t G_GAME_TWO_OPTIONS = 2
 Used by multiple games or an attribute not specific to one game.
static const uint32_t G_GAME_THREE_OPTIONS = 3
 Used by multiple games or an attribute not specific to one game.
static const std::string G_GAME_UNKNOWN_OPTION = "N/A"
 Used by multiple games or an attribute not specific to one game.
static const std::string G_GAME_NUMBER_OF_PLAYERS = "# of Players = "
 Used by multiple games or an attribute not specific to one game.
static const std::string G_GAME_COMPUTER_SPEED = "Computer Speed = "
 Used by multiple games or an attribute not specific to one game.
static const std::vector< std::string > G_GAME_COMPUTER_SPEED_OPTIONS = {"INSTANT", "FAST", "SLOW"}
 Used by multiple games or an attribute not specific to one game.
static const std::vector< std::string > G_GAME_MAX_TWO_PLAYERS_OPTIONS = {"0", "1", "2"}
 Used by multiple games or an attribute not specific to one game.
static const std::vector< std::string > G_GAME_MAX_ONE_PLAYER_OPTIONS = {"0", "1"}
 Used by multiple games or an attribute not specific to one game.
static const uint32_t G_TICTACTOE_GRID_WIDTH = 3
 TicTacToe grid attributes.
static const uint32_t G_TICTACTOE_GRID_HEIGHT = 3
 TicTacToe grid attributes.
static const uint32_t G_TICTACTOE_GRID_ELEMENT_WIDTH = 3
 TicTacToe grid attributes.
static const uint32_t G_TICTACTOE_GRID_ELEMENT_HEIGHT = 1
 TicTacToe grid attributes.
static const uint32_t G_TICTACTOE_GRID_LEFT_PAD = 3
 TicTacToe grid attributes.
static const uint32_t G_TICTACTOE_GRID_TOP_PAD = 4
 TicTacToe grid attributes.
static const std::string G_TICTACTOE_GRID_ROW_VALUE_DIVIDER = std::string(G_TICTACTOE_GRID_ELEMENT_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE)
 TicTacToe grid values.
static const std::string G_TICTACTOE_EMPTY_GRID_VALUE = std::string(G_TICTACTOE_GRID_ELEMENT_WIDTH, ' ')
 TicTacToe grid values.
static const std::string G_TICTACTOE_GRID_PLAYER_X_OCCUPIED = " X "
 TicTacToe grid values.
static const std::string G_TICTACTOE_GRID_PLAYER_O_OCCUPIED = " O "
 TicTacToe grid values.
static const std::string G_TICTACTOE_PLAYER_X = "Player X"
 TicTacToe player choice options.
static const std::string G_TICTACTOE_PLAYER_O = "Player O"
 TicTacToe player choice options.
static const std::vector< std::string > G_TICTACTOE_PLAYER_CHOICE_OPTIONS = {G_TICTACTOE_PLAYER_X, G_TICTACTOE_PLAYER_O}
 TicTacToe player choice options.
static const uint32_t G_HANGMAN_MINIMUM_WORD_SIZE = 3
 Hangman word to be guessed constraints.
static const uint32_t G_HANGMAN_MAXIMUM_WORD_SIZE = 16
 Hangman word to be guessed constraints.
static const uint32_t G_HANGMAN_USER_INPUT_ROW = 13
 Hangman cursor position when getting user input on Windows.
static const uint32_t G_HANGMAN_GET_WORD_FROM_USER_COLUMN = 39
 Hangman cursor position when getting user input on Windows.
static const uint32_t G_HANGMAN_GET_USER_COMMAND_COLUMN = 41
 Hangman cursor position when getting user input on Windows.
static const uint32_t G_HANGMAN_GALLOWS_BASE_WIDTH = 7
 Hangman constants used to construct the hangman.
static const uint32_t G_HANGMAN_GALLOWS_BASE_WIDTH_HALF = 3
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_BASE_INITIAL = std::string(G_HANGMAN_GALLOWS_BASE_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE) + " "
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_BASE_HALF = std::string(G_HANGMAN_GALLOWS_BASE_WIDTH_HALF, G_PAGE_GRID_HORIZONTAL_LINE)
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_BASE = G_HANGMAN_GALLOWS_BASE_HALF + std::string(1, G_PAGE_GRID_UPSIDE_DOWN_T) + G_HANGMAN_GALLOWS_BASE_HALF + " "
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_VERTICAL_BEAM = " " + std::string(1, Globals::G_PAGE_GRID_VERTICAL_LINE)
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_VERTICAL_BEAM_WITH_PADDING = G_HANGMAN_GALLOWS_VERTICAL_BEAM + " "
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_VERTICAL_BEAM_WITH_ROPE = Globals::G_HANGMAN_GALLOWS_VERTICAL_BEAM + " " + Globals::G_PAGE_GRID_VERTICAL_LINE + ' '
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_TOP_BEAM_INITIAL = " " + std::string(1, Globals::G_PAGE_GRID_TOP_LEFT) + std::string(G_HANGMAN_GALLOWS_BASE_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE) + " "
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GALLOWS_TOP_BEAM = " " + std::string(1, Globals::G_PAGE_GRID_TOP_LEFT) + std::string(G_HANGMAN_GALLOWS_BASE_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE) + Globals::G_PAGE_GRID_TOP_RIGHT + ' '
 Hangman constants used to construct the hangman.
static const char G_HANGMAN_HIDDEN_LETTER = '_'
 Hangman constants used to construct the hangman.
static const std::vector< std::vector< std::string > > G_HANGMAN_STATES
 Hangman constants used to display the current state of the Hangman game.
static const std::string G_HANGMAN_INCORRECT_GUESSES_TITLE = "Incorrect Guesses"
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_INCORRECT_GUESSES_PADDING = " "
 Hangman constants used to construct the hangman.
static const uint32_t G_HANGMAN_INCORRECT_GUESSES_FIRST_LINE_LAST_INDEX = 4
 Hangman constants used to construct the hangman.
static const uint32_t G_HANGMAN_INCORRECT_GUESSES_SECOND_LINE_LAST_INDEX = 9
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_WORD_TO_BE_GUESSED_START = "(The word was "
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_WORD_TO_BE_GUESSED_END = ")"
 Hangman constants used to construct the hangman.
static const std::string G_HANGMAN_GUESSER = "GUESSER"
 Hangman player choice options.
static const std::string G_HANGMAN_WORD_SETTER = "WORD SETTER"
 Hangman player choice options.
static const std::vector< std::string > G_HANGMAN_PLAYER_CHOICE_OPTIONS = {G_HANGMAN_GUESSER, G_HANGMAN_WORD_SETTER}
 Hangman player choice options.
static const uint32_t G_HANGMAN_NUMBER_OF_COMPUTER_WORDS = 972
 Hangman computer word list for when the computer is asked to chose a word to be guessed.
static const std::array< std::string, G_HANGMAN_NUMBER_OF_COMPUTER_WORDSG_HANGMAN_COMPUTER_WORDS
 Hangman computer word list for when the computer is asked to chose a word to be guessed.
static const uint32_t G_BATTLESHIPS_BOARD_WIDTH = 10
 Battleships board attributes.
static const uint32_t G_BATTLESHIPS_BOARD_HEIGHT = 10
 Battleships board attributes.
static const uint32_t G_BATTLESHIPS_GRID_ELEMENT_WIDTH = 3
 Battleships board attributes.
static const uint32_t G_BATTLESHIPS_GRID_ELEMENT_HEIGHT = 1
 Battleships board attributes.
static const uint32_t G_BATTLESHIPS_GRID_PLAYER_ONE_BOARD_LEFT_PAD = 8
 Battleships board attributes.
static const uint32_t G_BATTLESHIPS_GRID_PLAYER_TWO_BOARD_LEFT_PAD = 101
 Battleships board attributes.
static const uint32_t G_BATTLESHIPS_GRID_TOP_PAD = 8
 Battleships board attributes.
static const std::string G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE)
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_TOP_LINE_TOP_LEFT = std::string(1, G_PAGE_GRID_TOP_LEFT) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_TOP_LINE_MIDDLE = std::string(1, G_PAGE_GRID_T) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_MIDDLE_LINE_LEFT = std::string(1, G_PAGE_GRID_LEFT_SIDEWAYS_T) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_MIDDLE_LINE_MIDDLE = std::string(1, G_PAGE_GRID_INTERSECTION) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_BOTTOM_LINE_BOTTOM_LEFT = std::string(1, G_PAGE_GRID_BOTTOM_LEFT) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_BOTTOM_LINE_MIDDLE = std::string(1, G_PAGE_GRID_UPSIDE_DOWN_T) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_TOP_LINE = G_BATTLESHIPS_GRID_TOP_LINE_TOP_LEFT + RepeatString(G_BATTLESHIPS_BOARD_WIDTH, G_BATTLESHIPS_GRID_TOP_LINE_MIDDLE) + std::string(1, G_PAGE_GRID_TOP_RIGHT)
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_MIDDLE_LINE = G_BATTLESHIPS_GRID_MIDDLE_LINE_LEFT + RepeatString(G_BATTLESHIPS_BOARD_WIDTH, G_BATTLESHIPS_GRID_MIDDLE_LINE_MIDDLE) + std::string(1, G_PAGE_GRID_RIGHT_SIDEWAYS_T)
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_GRID_BOTTOM_LINE = G_BATTLESHIPS_GRID_BOTTOM_LINE_BOTTOM_LEFT + RepeatString(G_BATTLESHIPS_BOARD_WIDTH, G_BATTLESHIPS_GRID_BOTTOM_LINE_MIDDLE) + std::string(1, G_PAGE_GRID_BOTTOM_RIGHT)
 Battleships board constants used to construct the board.
static const uint32_t G_BATTLESHIPS_LETTER_OFFSET = 65
 Battleships board constants used to construct the board.
static const std::string G_BATTLESHIPS_EMPTY_GRID_VALUE = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, ' ')
 Battleships board values.
static const std::string G_BATTLESHIPS_MISSED_ATTACK = std::string(1, ' ') + G_PAGE_CENTRAL_DOT + ' '
 Battleships board values.
static const std::string G_BATTLESHIPS_SHIP_PRESENT = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, G_PAGE_DARK_HASH)
 Battleships board values.
static const std::string G_BATTLESHIPS_SUCCESSFUL_ATTACK = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, G_PAGE_LIGHT_HASH)
 Battleships board values.
static const std::string G_BATTLESHIPS_PLAYER_ONE = "Player One"
 Battleships player choice options.
static const std::string G_BATTLESHIPS_PLAYER_TWO = "Player Two"
 Battleships player choice options.
static const std::array< std::string, G_GAME_TWO_OPTIONSG_BATTLESHIPS_PLAYER_CHOICE_OPTIONS = {G_BATTLESHIPS_PLAYER_ONE, G_BATTLESHIPS_PLAYER_TWO}
 Battleships player choice options.
static const uint32_t G_BATTLESHIPS_CARRIER_SIZE = 5
 Battleships ship-related constants used in later arrays.
static const uint32_t G_BATTLESHIPS_BATTLESHIP_SIZE = 4
 Battleships ship-related constants used in later arrays.
static const uint32_t G_BATTLESHIPS_DESTROYER_SIZE = 3
 Battleships ship-related constants used in later arrays.
static const uint32_t G_BATTLESHIPS_SUBMARINE_SIZE = 3
 Battleships ship-related constants used in later arrays.
static const uint32_t G_BATTLESHIPS_PATROL_BOAT_SIZE = 2
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_CARRIER_NAME = "Carrier"
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_BATTLESHIP_NAME = "Battleship"
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_DESTROYER_NAME = "Destroyer"
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_SUBMARINE_NAME = "Submarine"
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_PATROL_BOAT_NAME = "Patrol Boat"
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_CARRIER_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_CARRIER_NAME
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_BATTLESHIP_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_BATTLESHIP_NAME
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_DESTROYER_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_DESTROYER_NAME
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_SUBMARINE_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_SUBMARINE_NAME
 Battleships ship-related constants used in later arrays.
static const std::string G_BATTLESHIPS_PATROL_BOAT_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_PATROL_BOAT_NAME
 Battleships ship-related constants used in later arrays.

Detailed Description

Contains all global and constant objects.

Enumeration Type Documentation

◆ Colours

enum class TerminalGames::Globals::Colours : std::uint8_t
strong

Colours representing ANSI escape codes.

Enumerator
WHITE 

Supported ANSI escape colour.

RED  

Supported ANSI escape colour.

BLUE  

Supported ANSI escape colour.

GREEN  

Supported ANSI escape colour.

YELLOW  

Supported ANSI escape colour.

RESET  

Supported ANSI escape colour.

Definition at line 260 of file Globals.hpp.

Function Documentation

◆ ImplementStdRangesFind()

template<typename T, typename U>
constexpr T TerminalGames::Globals::ImplementStdRangesFind ( const T & p_begin,
const T & p_end,
const U & p_value )
staticconstexpr

Implements std::ranges::find which should work for all standard template library containers.

Template Parameters
TAny standard template library container.
UThe type being stored by the standard template library container.
Parameters
p_beginThe iterator returned from begin() function.
p_endThe iterator returned from end() function.
p_valueThe value to find in the standard template library container.
Returns
T An iterator to the found value. If the value is not found then p_end is returned.
Warning
Don't use this. Just use the built-in std::ranges::find. This has been crudely implemented as std::ranges::find was not supported by the ubuntu-latest compilers in the CI workflow.

Definition at line 86 of file Globals.hpp.

◆ ImplementStdCount()

template<typename T, typename U>
constexpr int32_t TerminalGames::Globals::ImplementStdCount ( const T & p_begin,
const T & p_end,
const U & p_value )
staticconstexpr

Implements std::count which it should work for all standard template library containers.

Template Parameters
TAny standard template library container.
UThe type being stored by the standard template library container.
Parameters
p_beginThe iterator returned from begin() function.
p_endThe iterator returned from end() function.
p_valueThe value to count in the standard template library container.
Returns
int32_t The number of occurrences of p_value in the input container.
Warning
Don't use this. Just use the built-in std::count. This has been crudely implemented as std::count was not supported by the ubuntu-latest compilers in the CI workflow.

Definition at line 112 of file Globals.hpp.

◆ RepeatString()

std::string TerminalGames::Globals::RepeatString ( const uint32_t & p_numberOfRepetitions,
const std::string & p_stringToRepeat )
static

Repeats p_stringToRepeat for a total of p_numberOfRepetitions number of times.

Parameters
p_numberOfRepetitionsThe number of times to repeat p_stringToRepeat.
p_stringToRepeatThe string to repeat.
Returns
std::string The input p_stringToRepeat repeated p_numberOfRepetitions number of times.

Definition at line 134 of file Globals.hpp.

◆ RemoveSubString()

constexpr void TerminalGames::Globals::RemoveSubString ( std::string & p_string,
const std::string & p_subString )
staticconstexpr

Removes in-place all instances of a p_subString from p_string .

Parameters
p_stringThe string to be checked and edited.
p_subStringThe substring to be removed.

Definition at line 150 of file Globals.hpp.

Variable Documentation

◆ G_PLATFORM_IS_WINDOWS

const bool TerminalGames::Globals::G_PLATFORM_IS_WINDOWS = false
inlinestatic

Used by PageBuilder to display the current platform being used and used by Terminal to decided whether to use <Windows.h> for enhanced user input.

Definition at line 166 of file Globals.hpp.

◆ G_MAIN_MENU_CLI_HELP_MESSAGE

const std::string TerminalGames::Globals::G_MAIN_MENU_CLI_HELP_MESSAGE = "\nUsage: terminal-games [options]\n\nOPTIONS:\n\nGeneric Options:\n\n -h --help Display available options.\n\nOptional Options:\n\n --a --ascii-only Only use extended ASCII characters (this removes all colour).\n\n"
inlinestatic

CLI help message.

Definition at line 172 of file Globals.hpp.

◆ G_PAGE_HORIZONTAL_LINE

const char TerminalGames::Globals::G_PAGE_HORIZONTAL_LINE = static_cast<char>(205)
inlinestatic

Extended ASCII characters for edges and corners of the page.

Definition at line 178 of file Globals.hpp.

◆ G_PAGE_VERTICAL_LINE

const char TerminalGames::Globals::G_PAGE_VERTICAL_LINE = static_cast<char>(186)
inlinestatic

Extended ASCII characters for edges and corners of the page.

Definition at line 179 of file Globals.hpp.

◆ G_PAGE_TOP_RIGHT_CORNER

const char TerminalGames::Globals::G_PAGE_TOP_RIGHT_CORNER = static_cast<char>(187)
inlinestatic

Extended ASCII characters for edges and corners of the page.

Definition at line 180 of file Globals.hpp.

◆ G_PAGE_BOTTOM_RIGHT_CORNER

const char TerminalGames::Globals::G_PAGE_BOTTOM_RIGHT_CORNER = static_cast<char>(188)
inlinestatic

Extended ASCII characters for edges and corners of the page.

Definition at line 181 of file Globals.hpp.

◆ G_PAGE_BOTTOM_LEFT_CORNER

const char TerminalGames::Globals::G_PAGE_BOTTOM_LEFT_CORNER = static_cast<char>(200)
inlinestatic

Extended ASCII characters for edges and corners of the page.

Definition at line 182 of file Globals.hpp.

◆ G_PAGE_TOP_LEFT_CORNER

const char TerminalGames::Globals::G_PAGE_TOP_LEFT_CORNER = static_cast<char>(201)
inlinestatic

Extended ASCII characters for edges and corners of the page.

Definition at line 183 of file Globals.hpp.

◆ G_PAGE_GRID_HORIZONTAL_LINE

const char TerminalGames::Globals::G_PAGE_GRID_HORIZONTAL_LINE = static_cast<char>(196)
inlinestatic

Extended ASCII characters for grids.

Definition at line 190 of file Globals.hpp.

◆ G_PAGE_GRID_VERTICAL_LINE

const char TerminalGames::Globals::G_PAGE_GRID_VERTICAL_LINE = static_cast<char>(179)
inlinestatic

Extended ASCII characters for grids.

Definition at line 191 of file Globals.hpp.

◆ G_PAGE_GRID_INTERSECTION

const char TerminalGames::Globals::G_PAGE_GRID_INTERSECTION = static_cast<char>(197)
inlinestatic

Extended ASCII characters for grids.

Definition at line 192 of file Globals.hpp.

◆ G_PAGE_GRID_UPSIDE_DOWN_T

const char TerminalGames::Globals::G_PAGE_GRID_UPSIDE_DOWN_T = static_cast<char>(193)
inlinestatic

Extended ASCII characters for grids.

Definition at line 193 of file Globals.hpp.

◆ G_PAGE_GRID_T

const char TerminalGames::Globals::G_PAGE_GRID_T = static_cast<char>(194)
inlinestatic

Extended ASCII characters for grids.

Definition at line 194 of file Globals.hpp.

◆ G_PAGE_GRID_LEFT_SIDEWAYS_T

const char TerminalGames::Globals::G_PAGE_GRID_LEFT_SIDEWAYS_T = static_cast<char>(195)
inlinestatic

Extended ASCII characters for grids.

Definition at line 195 of file Globals.hpp.

◆ G_PAGE_GRID_RIGHT_SIDEWAYS_T

const char TerminalGames::Globals::G_PAGE_GRID_RIGHT_SIDEWAYS_T = static_cast<char>(180)
inlinestatic

Extended ASCII characters for grids.

Definition at line 196 of file Globals.hpp.

◆ G_PAGE_GRID_TOP_LEFT

const char TerminalGames::Globals::G_PAGE_GRID_TOP_LEFT = static_cast<char>(218)
inlinestatic

Extended ASCII characters for grids.

Definition at line 197 of file Globals.hpp.

◆ G_PAGE_GRID_TOP_RIGHT

const char TerminalGames::Globals::G_PAGE_GRID_TOP_RIGHT = static_cast<char>(191)
inlinestatic

Extended ASCII characters for grids.

Definition at line 198 of file Globals.hpp.

◆ G_PAGE_GRID_BOTTOM_LEFT

const char TerminalGames::Globals::G_PAGE_GRID_BOTTOM_LEFT = static_cast<char>(192)
inlinestatic

Extended ASCII characters for grids.

Definition at line 199 of file Globals.hpp.

◆ G_PAGE_GRID_BOTTOM_RIGHT

const char TerminalGames::Globals::G_PAGE_GRID_BOTTOM_RIGHT = static_cast<char>(217)
inlinestatic

Extended ASCII characters for grids.

Definition at line 200 of file Globals.hpp.

◆ G_PAGE_CENTRAL_DOT

const char TerminalGames::Globals::G_PAGE_CENTRAL_DOT = static_cast<char>(250)
inlinestatic

Misc extended ASCII characters.

Definition at line 207 of file Globals.hpp.

◆ G_PAGE_LIGHT_HASH

const char TerminalGames::Globals::G_PAGE_LIGHT_HASH = static_cast<char>(176)
inlinestatic

Misc extended ASCII characters.

Definition at line 208 of file Globals.hpp.

◆ G_PAGE_DARK_HASH

const char TerminalGames::Globals::G_PAGE_DARK_HASH = static_cast<char>(178)
inlinestatic

Misc extended ASCII characters.

Definition at line 209 of file Globals.hpp.

◆ G_PAGE_MINIMUM_LEFT_VERTICAL_LINE_SIZE

const uint32_t TerminalGames::Globals::G_PAGE_MINIMUM_LEFT_VERTICAL_LINE_SIZE = 1
inlinestatic

Minimum padding amounts.

Definition at line 217 of file Globals.hpp.

◆ G_PAGE_MINIMUM_LEFT_PADDING_SIZE

const uint32_t TerminalGames::Globals::G_PAGE_MINIMUM_LEFT_PADDING_SIZE = 1
inlinestatic

Minimum padding amounts.

Definition at line 218 of file Globals.hpp.

◆ G_PAGE_MINIMUM_RIGHT_PADDING_SIZE

const uint32_t TerminalGames::Globals::G_PAGE_MINIMUM_RIGHT_PADDING_SIZE = 1
inlinestatic

Minimum padding amounts.

Definition at line 219 of file Globals.hpp.

◆ G_PAGE_MINIMUM_RIGHT_VERTICAL_LINE_SIZE

const uint32_t TerminalGames::Globals::G_PAGE_MINIMUM_RIGHT_VERTICAL_LINE_SIZE = 1
inlinestatic

Minimum padding amounts.

Definition at line 220 of file Globals.hpp.

◆ G_PAGE_OPTION_SELECTOR

const std::string TerminalGames::Globals::G_PAGE_OPTION_SELECTOR = ">"
inlinestatic

For when highlighting what is currently selected in an option menu.

Definition at line 227 of file Globals.hpp.

◆ G_PAGE_OPTION_SELECTOR_ABSENT_PADDING

const std::string TerminalGames::Globals::G_PAGE_OPTION_SELECTOR_ABSENT_PADDING = std::string(Globals::G_PAGE_OPTION_SELECTOR.size() + 1, ' ')
inlinestatic

For when highlighting what is currently selected in an option menu.

Definition at line 228 of file Globals.hpp.

◆ G_PAGE_ANSI_COLOUR_ESCAPE_CODE_COUNT

const uint32_t TerminalGames::Globals::G_PAGE_ANSI_COLOUR_ESCAPE_CODE_COUNT = 6
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 235 of file Globals.hpp.

◆ G_PAGE_ANSI_COLOUR_ESCAPE_CODE_SIZE

const uint32_t TerminalGames::Globals::G_PAGE_ANSI_COLOUR_ESCAPE_CODE_SIZE = 7
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 236 of file Globals.hpp.

◆ G_PAGE_ANSI_COLOUR_ESCAPE_CODE_START

const char TerminalGames::Globals::G_PAGE_ANSI_COLOUR_ESCAPE_CODE_START = '\x1B'
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 237 of file Globals.hpp.

◆ G_PAGE_ANSI_WHITE_COLOUR_ESCAPE_CODE

const std::string TerminalGames::Globals::G_PAGE_ANSI_WHITE_COLOUR_ESCAPE_CODE = "\x1B[1;37m"
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 238 of file Globals.hpp.

◆ G_PAGE_ANSI_RED_COLOUR_ESCAPE_CODE

const std::string TerminalGames::Globals::G_PAGE_ANSI_RED_COLOUR_ESCAPE_CODE = "\x1B[1;31m"
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 239 of file Globals.hpp.

◆ G_PAGE_ANSI_BLUE_COLOUR_ESCAPE_CODE

const std::string TerminalGames::Globals::G_PAGE_ANSI_BLUE_COLOUR_ESCAPE_CODE = "\x1B[1;34m"
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 240 of file Globals.hpp.

◆ G_PAGE_ANSI_GREEN_COLOUR_ESCAPE_CODE

const std::string TerminalGames::Globals::G_PAGE_ANSI_GREEN_COLOUR_ESCAPE_CODE = "\x1B[1;32m"
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 241 of file Globals.hpp.

◆ G_PAGE_ANSI_YELLOW_COLOUR_ESCAPE_CODE

const std::string TerminalGames::Globals::G_PAGE_ANSI_YELLOW_COLOUR_ESCAPE_CODE = "\x1B[1;33m"
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 242 of file Globals.hpp.

◆ G_PAGE_ANSI_RESET_COLOUR_ESCAPE_CODE

const std::string TerminalGames::Globals::G_PAGE_ANSI_RESET_COLOUR_ESCAPE_CODE = "\x1B[0m"
inlinestatic

ANSI colour escape codes to add colour to output.

Definition at line 243 of file Globals.hpp.

◆ G_PAGE_ANSI_ALL_COLOUR_ESCAPE_CODES

const std::array<std::string, G_PAGE_ANSI_COLOUR_ESCAPE_CODE_COUNT> TerminalGames::Globals::G_PAGE_ANSI_ALL_COLOUR_ESCAPE_CODES
inlinestatic
Initial value:
= {
}
static const std::string G_PAGE_ANSI_RED_COLOUR_ESCAPE_CODE
ANSI colour escape codes to add colour to output.
Definition Globals.hpp:239
static const std::string G_PAGE_ANSI_BLUE_COLOUR_ESCAPE_CODE
ANSI colour escape codes to add colour to output.
Definition Globals.hpp:240
static const std::string G_PAGE_ANSI_YELLOW_COLOUR_ESCAPE_CODE
ANSI colour escape codes to add colour to output.
Definition Globals.hpp:242
static const std::string G_PAGE_ANSI_GREEN_COLOUR_ESCAPE_CODE
ANSI colour escape codes to add colour to output.
Definition Globals.hpp:241
static const std::string G_PAGE_ANSI_WHITE_COLOUR_ESCAPE_CODE
ANSI colour escape codes to add colour to output.
Definition Globals.hpp:238
static const std::string G_PAGE_ANSI_RESET_COLOUR_ESCAPE_CODE
ANSI colour escape codes to add colour to output.
Definition Globals.hpp:243
Warning
The order should match the order Colours enum.

Definition at line 247 of file Globals.hpp.

◆ G_HOMEPAGE_TOP_TITLE

const std::string TerminalGames::Globals::G_HOMEPAGE_TOP_TITLE = "Terminal Games"
inlinestatic

Page attributes for the homepage.

Definition at line 279 of file Globals.hpp.

◆ G_HOMEPAGE_BOTTOM_TITLE

const std::string TerminalGames::Globals::G_HOMEPAGE_BOTTOM_TITLE = "q = quit program"
inlinestatic

Page attributes for the homepage.

Definition at line 280 of file Globals.hpp.

◆ G_HOMEPAGE_DISPLAY_WIDTH

const uint32_t TerminalGames::Globals::G_HOMEPAGE_DISPLAY_WIDTH = 40
inlinestatic

Page attributes for the homepage.

Definition at line 281 of file Globals.hpp.

◆ G_HOMEPAGE_DISPLAY_HEIGHT

const uint32_t TerminalGames::Globals::G_HOMEPAGE_DISPLAY_HEIGHT = 20
inlinestatic

Page attributes for the homepage.

Definition at line 282 of file Globals.hpp.

◆ G_MAIN_MENU_TOP_TITLE

const std::string TerminalGames::Globals::G_MAIN_MENU_TOP_TITLE = "Main Menu"
inlinestatic

Page attributes for the MainMenu page.

Definition at line 289 of file Globals.hpp.

◆ G_MAIN_MENU_BOTTOM_TITLE

const std::string TerminalGames::Globals::G_MAIN_MENU_BOTTOM_TITLE = "q = quit to homepage"
inlinestatic

Page attributes for the MainMenu page.

Definition at line 290 of file Globals.hpp.

◆ G_MAIN_MENU_DISPLAY_WIDTH

const uint32_t TerminalGames::Globals::G_MAIN_MENU_DISPLAY_WIDTH = 32
inlinestatic

Page attributes for the MainMenu page.

Definition at line 291 of file Globals.hpp.

◆ G_MAIN_MENU_DISPLAY_HEIGHT

const uint32_t TerminalGames::Globals::G_MAIN_MENU_DISPLAY_HEIGHT = 13
inlinestatic

Page attributes for the MainMenu page.

Definition at line 292 of file Globals.hpp.

◆ G_TICTACTOE_TOP_TITLE

const std::string TerminalGames::Globals::G_TICTACTOE_TOP_TITLE = "Tic Tac Toe"
inlinestatic

Page attributes for all TicTacToe pages.

Definition at line 299 of file Globals.hpp.

◆ G_TICTACTOE_BOTTOM_TITLE

const std::string TerminalGames::Globals::G_TICTACTOE_BOTTOM_TITLE = "q = show quit menu"
inlinestatic

Page attributes for all TicTacToe pages.

Definition at line 300 of file Globals.hpp.

◆ G_TICTACTOE_DISPLAY_WIDTH

const uint32_t TerminalGames::Globals::G_TICTACTOE_DISPLAY_WIDTH = 57
inlinestatic

Page attributes for all TicTacToe pages.

Definition at line 301 of file Globals.hpp.

◆ G_TICTACTOE_DISPLAY_HEIGHT

const uint32_t TerminalGames::Globals::G_TICTACTOE_DISPLAY_HEIGHT = 19
inlinestatic

Page attributes for all TicTacToe pages.

Definition at line 302 of file Globals.hpp.

◆ G_HANGMAN_TOP_TITLE

const std::string TerminalGames::Globals::G_HANGMAN_TOP_TITLE = "Hangman"
inlinestatic

Page attributes for all Hangman pages.

Definition at line 309 of file Globals.hpp.

◆ G_HANGMAN_BOTTOM_TITLE

const std::string TerminalGames::Globals::G_HANGMAN_BOTTOM_TITLE = "q = show quit menu"
inlinestatic

Page attributes for all Hangman pages.

Definition at line 310 of file Globals.hpp.

◆ G_HANGMAN_DISPLAY_WIDTH

const uint32_t TerminalGames::Globals::G_HANGMAN_DISPLAY_WIDTH = 62
inlinestatic

Page attributes for all Hangman pages.

Definition at line 311 of file Globals.hpp.

◆ G_HANGMAN_DISPLAY_HEIGHT

const uint32_t TerminalGames::Globals::G_HANGMAN_DISPLAY_HEIGHT = 22
inlinestatic

Page attributes for all Hangman pages.

Definition at line 312 of file Globals.hpp.

◆ G_BATTLESHIPS_TOP_TITLE

const std::string TerminalGames::Globals::G_BATTLESHIPS_TOP_TITLE = "Battleships"
inlinestatic

Page attributes for all Battleships pages.

Definition at line 319 of file Globals.hpp.

◆ G_BATTLESHIPS_BOTTOM_TITLE

const std::string TerminalGames::Globals::G_BATTLESHIPS_BOTTOM_TITLE = "q = show quit menu"
inlinestatic

Page attributes for all Battleships pages.

Definition at line 320 of file Globals.hpp.

◆ G_BATTLESHIPS_DISPLAY_WIDTH

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_DISPLAY_WIDTH = 142
inlinestatic

Page attributes for all Battleships pages.

Definition at line 321 of file Globals.hpp.

◆ G_BATTLESHIPS_DISPLAY_HEIGHT

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_DISPLAY_HEIGHT = 38
inlinestatic

Page attributes for all Battleships pages.

Definition at line 322 of file Globals.hpp.

◆ G_QUIT_MENU_RESTART_GAME_INDEX

const uint32_t TerminalGames::Globals::G_QUIT_MENU_RESTART_GAME_INDEX = 0
inlinestatic

Quit menu options.

Definition at line 329 of file Globals.hpp.

◆ G_QUIT_MENU_RESET_GAME_INDEX

const uint32_t TerminalGames::Globals::G_QUIT_MENU_RESET_GAME_INDEX = 1
inlinestatic

Quit menu options.

Definition at line 330 of file Globals.hpp.

◆ G_QUIT_MENU_QUIT_GAME_INDEX

const uint32_t TerminalGames::Globals::G_QUIT_MENU_QUIT_GAME_INDEX = 2
inlinestatic

Quit menu options.

Definition at line 331 of file Globals.hpp.

◆ G_QUIT_MENU_QUIT_MAIN_MENU_INDEX

const uint32_t TerminalGames::Globals::G_QUIT_MENU_QUIT_MAIN_MENU_INDEX = 3
inlinestatic

Quit menu options.

Definition at line 332 of file Globals.hpp.

◆ G_QUIT_MENU_QUIT_PROGRAM_INDEX

const uint32_t TerminalGames::Globals::G_QUIT_MENU_QUIT_PROGRAM_INDEX = 4
inlinestatic

Quit menu options.

Definition at line 333 of file Globals.hpp.

◆ G_QUIT_MENU_CANCEL_INDEX

const uint32_t TerminalGames::Globals::G_QUIT_MENU_CANCEL_INDEX = 5
inlinestatic

Quit menu options.

Definition at line 334 of file Globals.hpp.

◆ G_QUIT_MENU_OPTIONS

const std::vector<std::string> TerminalGames::Globals::G_QUIT_MENU_OPTIONS
inlinestatic
Initial value:
= {
"Restart Game",
"Reset Game",
"Quit to Main Menu",
"Quit to Homepage",
"Quit Program",
"Cancel",
}

Quit menu options.

Definition at line 335 of file Globals.hpp.

◆ G_TERMINAL_ENTER_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ENTER_KEY = '\r'
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 349 of file Globals.hpp.

◆ G_TERMINAL_BACKSPACE_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_BACKSPACE_KEY = 8
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 350 of file Globals.hpp.

◆ G_TERMINAL_UP_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_UP_ARROW_KEY = 72
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 351 of file Globals.hpp.

◆ G_TERMINAL_DOWN_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_DOWN_ARROW_KEY = 80
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 352 of file Globals.hpp.

◆ G_TERMINAL_LEFT_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_LEFT_ARROW_KEY = 75
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 353 of file Globals.hpp.

◆ G_TERMINAL_RIGHT_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_RIGHT_ARROW_KEY = 77
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 354 of file Globals.hpp.

◆ G_TERMINAL_QUIT_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_QUIT_KEY = 'q'
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 355 of file Globals.hpp.

◆ G_TERMINAL_RESTART_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_RESTART_KEY = 'r'
inlinestatic

Keyboard values when getting user input on Windows.

Definition at line 356 of file Globals.hpp.

◆ G_TERMINAL_ALTERNATIVE_ENTER_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ALTERNATIVE_ENTER_KEY = 'e'
inlinestatic

Keyboard values when getting user input other platforms.

Definition at line 363 of file Globals.hpp.

◆ G_TERMINAL_ALTERNATIVE_BACKSPACE_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ALTERNATIVE_BACKSPACE_KEY = 'z'
inlinestatic

Keyboard values when getting user input other platforms.

Definition at line 364 of file Globals.hpp.

◆ G_TERMINAL_ALTERNATIVE_UP_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ALTERNATIVE_UP_ARROW_KEY = 'w'
inlinestatic

Keyboard values when getting user input other platforms.

Definition at line 365 of file Globals.hpp.

◆ G_TERMINAL_ALTERNATIVE_DOWN_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ALTERNATIVE_DOWN_ARROW_KEY = 's'
inlinestatic

Keyboard values when getting user input other platforms.

Definition at line 366 of file Globals.hpp.

◆ G_TERMINAL_ALTERNATIVE_LEFT_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ALTERNATIVE_LEFT_ARROW_KEY = 'a'
inlinestatic

Keyboard values when getting user input other platforms.

Definition at line 367 of file Globals.hpp.

◆ G_TERMINAL_ALTERNATIVE_RIGHT_ARROW_KEY

const uint32_t TerminalGames::Globals::G_TERMINAL_ALTERNATIVE_RIGHT_ARROW_KEY = 'd'
inlinestatic

Keyboard values when getting user input other platforms.

Definition at line 368 of file Globals.hpp.

◆ G_TERMINAL_CURSOR_WIDTH_PERCENTAGE

const uint32_t TerminalGames::Globals::G_TERMINAL_CURSOR_WIDTH_PERCENTAGE = 100
inlinestatic

The cursor width while running on windows.

Definition at line 374 of file Globals.hpp.

◆ G_GAME_TWO_OPTIONS

const uint32_t TerminalGames::Globals::G_GAME_TWO_OPTIONS = 2
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 380 of file Globals.hpp.

◆ G_GAME_THREE_OPTIONS

const uint32_t TerminalGames::Globals::G_GAME_THREE_OPTIONS = 3
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 381 of file Globals.hpp.

◆ G_GAME_UNKNOWN_OPTION

const std::string TerminalGames::Globals::G_GAME_UNKNOWN_OPTION = "N/A"
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 382 of file Globals.hpp.

◆ G_GAME_NUMBER_OF_PLAYERS

const std::string TerminalGames::Globals::G_GAME_NUMBER_OF_PLAYERS = "# of Players = "
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 383 of file Globals.hpp.

◆ G_GAME_COMPUTER_SPEED

const std::string TerminalGames::Globals::G_GAME_COMPUTER_SPEED = "Computer Speed = "
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 384 of file Globals.hpp.

◆ G_GAME_COMPUTER_SPEED_OPTIONS

const std::vector<std::string> TerminalGames::Globals::G_GAME_COMPUTER_SPEED_OPTIONS = {"INSTANT", "FAST", "SLOW"}
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 385 of file Globals.hpp.

◆ G_GAME_MAX_TWO_PLAYERS_OPTIONS

const std::vector<std::string> TerminalGames::Globals::G_GAME_MAX_TWO_PLAYERS_OPTIONS = {"0", "1", "2"}
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 386 of file Globals.hpp.

◆ G_GAME_MAX_ONE_PLAYER_OPTIONS

const std::vector<std::string> TerminalGames::Globals::G_GAME_MAX_ONE_PLAYER_OPTIONS = {"0", "1"}
inlinestatic

Used by multiple games or an attribute not specific to one game.

Definition at line 387 of file Globals.hpp.

◆ G_TICTACTOE_GRID_WIDTH

const uint32_t TerminalGames::Globals::G_TICTACTOE_GRID_WIDTH = 3
inlinestatic

TicTacToe grid attributes.

Definition at line 394 of file Globals.hpp.

◆ G_TICTACTOE_GRID_HEIGHT

const uint32_t TerminalGames::Globals::G_TICTACTOE_GRID_HEIGHT = 3
inlinestatic

TicTacToe grid attributes.

Definition at line 395 of file Globals.hpp.

◆ G_TICTACTOE_GRID_ELEMENT_WIDTH

const uint32_t TerminalGames::Globals::G_TICTACTOE_GRID_ELEMENT_WIDTH = 3
inlinestatic

TicTacToe grid attributes.

Definition at line 396 of file Globals.hpp.

◆ G_TICTACTOE_GRID_ELEMENT_HEIGHT

const uint32_t TerminalGames::Globals::G_TICTACTOE_GRID_ELEMENT_HEIGHT = 1
inlinestatic

TicTacToe grid attributes.

Definition at line 397 of file Globals.hpp.

◆ G_TICTACTOE_GRID_LEFT_PAD

const uint32_t TerminalGames::Globals::G_TICTACTOE_GRID_LEFT_PAD = 3
inlinestatic

TicTacToe grid attributes.

Definition at line 398 of file Globals.hpp.

◆ G_TICTACTOE_GRID_TOP_PAD

const uint32_t TerminalGames::Globals::G_TICTACTOE_GRID_TOP_PAD = 4
inlinestatic

TicTacToe grid attributes.

Definition at line 399 of file Globals.hpp.

◆ G_TICTACTOE_GRID_ROW_VALUE_DIVIDER

const std::string TerminalGames::Globals::G_TICTACTOE_GRID_ROW_VALUE_DIVIDER = std::string(G_TICTACTOE_GRID_ELEMENT_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE)
inlinestatic

TicTacToe grid values.

Definition at line 406 of file Globals.hpp.

◆ G_TICTACTOE_EMPTY_GRID_VALUE

const std::string TerminalGames::Globals::G_TICTACTOE_EMPTY_GRID_VALUE = std::string(G_TICTACTOE_GRID_ELEMENT_WIDTH, ' ')
inlinestatic

TicTacToe grid values.

Definition at line 407 of file Globals.hpp.

◆ G_TICTACTOE_GRID_PLAYER_X_OCCUPIED

const std::string TerminalGames::Globals::G_TICTACTOE_GRID_PLAYER_X_OCCUPIED = " X "
inlinestatic

TicTacToe grid values.

Definition at line 408 of file Globals.hpp.

◆ G_TICTACTOE_GRID_PLAYER_O_OCCUPIED

const std::string TerminalGames::Globals::G_TICTACTOE_GRID_PLAYER_O_OCCUPIED = " O "
inlinestatic

TicTacToe grid values.

Definition at line 409 of file Globals.hpp.

◆ G_TICTACTOE_MAXIMUM_ERROR_COUNT

const uint32_t TerminalGames::Globals::G_TICTACTOE_MAXIMUM_ERROR_COUNT = G_TICTACTOE_GRID_WIDTH * G_TICTACTOE_GRID_HEIGHT
inlinestatic

TicTacToe maximum errors count to determine whether the game is over.

Definition at line 415 of file Globals.hpp.

◆ G_TICTACTOE_PLAYER_X

const std::string TerminalGames::Globals::G_TICTACTOE_PLAYER_X = "Player X"
inlinestatic

TicTacToe player choice options.

Definition at line 421 of file Globals.hpp.

◆ G_TICTACTOE_PLAYER_O

const std::string TerminalGames::Globals::G_TICTACTOE_PLAYER_O = "Player O"
inlinestatic

TicTacToe player choice options.

Definition at line 422 of file Globals.hpp.

◆ G_TICTACTOE_PLAYER_CHOICE_OPTIONS

const std::vector<std::string> TerminalGames::Globals::G_TICTACTOE_PLAYER_CHOICE_OPTIONS = {G_TICTACTOE_PLAYER_X, G_TICTACTOE_PLAYER_O}
inlinestatic

TicTacToe player choice options.

Definition at line 423 of file Globals.hpp.

◆ G_HANGMAN_MINIMUM_WORD_SIZE

const uint32_t TerminalGames::Globals::G_HANGMAN_MINIMUM_WORD_SIZE = 3
inlinestatic

Hangman word to be guessed constraints.

Definition at line 430 of file Globals.hpp.

◆ G_HANGMAN_MAXIMUM_WORD_SIZE

const uint32_t TerminalGames::Globals::G_HANGMAN_MAXIMUM_WORD_SIZE = 16
inlinestatic

Hangman word to be guessed constraints.

Definition at line 431 of file Globals.hpp.

◆ G_HANGMAN_USER_INPUT_ROW

const uint32_t TerminalGames::Globals::G_HANGMAN_USER_INPUT_ROW = 13
inlinestatic

Hangman cursor position when getting user input on Windows.

Definition at line 438 of file Globals.hpp.

◆ G_HANGMAN_GET_WORD_FROM_USER_COLUMN

const uint32_t TerminalGames::Globals::G_HANGMAN_GET_WORD_FROM_USER_COLUMN = 39
inlinestatic

Hangman cursor position when getting user input on Windows.

Definition at line 439 of file Globals.hpp.

◆ G_HANGMAN_GET_USER_COMMAND_COLUMN

const uint32_t TerminalGames::Globals::G_HANGMAN_GET_USER_COMMAND_COLUMN = 41
inlinestatic

Hangman cursor position when getting user input on Windows.

Definition at line 440 of file Globals.hpp.

◆ G_HANGMAN_KEY_PRESS_CHAR_OFFSET

const uint32_t TerminalGames::Globals::G_HANGMAN_KEY_PRESS_CHAR_OFFSET = 32
inlinestatic

Hangman value to minus from key press to get char representation.

Definition at line 446 of file Globals.hpp.

◆ G_HANGMAN_MAXIMUM_ERROR_COUNT

const uint32_t TerminalGames::Globals::G_HANGMAN_MAXIMUM_ERROR_COUNT = 10
inlinestatic

Hangman maximum errors count to determine whether the game is over.

Definition at line 451 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_BASE_WIDTH

const uint32_t TerminalGames::Globals::G_HANGMAN_GALLOWS_BASE_WIDTH = 7
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 457 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_BASE_WIDTH_HALF

const uint32_t TerminalGames::Globals::G_HANGMAN_GALLOWS_BASE_WIDTH_HALF = 3
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 458 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_BASE_INITIAL

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_BASE_INITIAL = std::string(G_HANGMAN_GALLOWS_BASE_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE) + " "
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 459 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_BASE_HALF

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_BASE_HALF = std::string(G_HANGMAN_GALLOWS_BASE_WIDTH_HALF, G_PAGE_GRID_HORIZONTAL_LINE)
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 460 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_BASE

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_BASE = G_HANGMAN_GALLOWS_BASE_HALF + std::string(1, G_PAGE_GRID_UPSIDE_DOWN_T) + G_HANGMAN_GALLOWS_BASE_HALF + " "
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 461 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_VERTICAL_BEAM

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_VERTICAL_BEAM = " " + std::string(1, Globals::G_PAGE_GRID_VERTICAL_LINE)
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 462 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_VERTICAL_BEAM_WITH_PADDING

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_VERTICAL_BEAM_WITH_PADDING = G_HANGMAN_GALLOWS_VERTICAL_BEAM + " "
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 463 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_VERTICAL_BEAM_WITH_ROPE

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_VERTICAL_BEAM_WITH_ROPE = Globals::G_HANGMAN_GALLOWS_VERTICAL_BEAM + " " + Globals::G_PAGE_GRID_VERTICAL_LINE + ' '
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 464 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_TOP_BEAM_INITIAL

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_TOP_BEAM_INITIAL = " " + std::string(1, Globals::G_PAGE_GRID_TOP_LEFT) + std::string(G_HANGMAN_GALLOWS_BASE_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE) + " "
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 465 of file Globals.hpp.

◆ G_HANGMAN_GALLOWS_TOP_BEAM

const std::string TerminalGames::Globals::G_HANGMAN_GALLOWS_TOP_BEAM = " " + std::string(1, Globals::G_PAGE_GRID_TOP_LEFT) + std::string(G_HANGMAN_GALLOWS_BASE_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE) + Globals::G_PAGE_GRID_TOP_RIGHT + ' '
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 466 of file Globals.hpp.

◆ G_HANGMAN_HIDDEN_LETTER

const char TerminalGames::Globals::G_HANGMAN_HIDDEN_LETTER = '_'
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 467 of file Globals.hpp.

◆ G_HANGMAN_STATES

const std::vector<std::vector<std::string> > TerminalGames::Globals::G_HANGMAN_STATES
inlinestatic

Hangman constants used to display the current state of the Hangman game.

Definition at line 473 of file Globals.hpp.

◆ G_HANGMAN_INCORRECT_GUESSES_TITLE

const std::string TerminalGames::Globals::G_HANGMAN_INCORRECT_GUESSES_TITLE = "Incorrect Guesses"
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 575 of file Globals.hpp.

◆ G_HANGMAN_INCORRECT_GUESSES_PADDING

const std::string TerminalGames::Globals::G_HANGMAN_INCORRECT_GUESSES_PADDING = " "
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 576 of file Globals.hpp.

◆ G_HANGMAN_INCORRECT_GUESSES_FIRST_LINE_LAST_INDEX

const uint32_t TerminalGames::Globals::G_HANGMAN_INCORRECT_GUESSES_FIRST_LINE_LAST_INDEX = 4
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 577 of file Globals.hpp.

◆ G_HANGMAN_INCORRECT_GUESSES_SECOND_LINE_LAST_INDEX

const uint32_t TerminalGames::Globals::G_HANGMAN_INCORRECT_GUESSES_SECOND_LINE_LAST_INDEX = 9
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 578 of file Globals.hpp.

◆ G_HANGMAN_WORD_TO_BE_GUESSED_START

const std::string TerminalGames::Globals::G_HANGMAN_WORD_TO_BE_GUESSED_START = "(The word was "
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 580 of file Globals.hpp.

◆ G_HANGMAN_WORD_TO_BE_GUESSED_END

const std::string TerminalGames::Globals::G_HANGMAN_WORD_TO_BE_GUESSED_END = ")"
inlinestatic

Hangman constants used to construct the hangman.

Definition at line 581 of file Globals.hpp.

◆ G_HANGMAN_GUESSER

const std::string TerminalGames::Globals::G_HANGMAN_GUESSER = "GUESSER"
inlinestatic

Hangman player choice options.

Definition at line 588 of file Globals.hpp.

◆ G_HANGMAN_WORD_SETTER

const std::string TerminalGames::Globals::G_HANGMAN_WORD_SETTER = "WORD SETTER"
inlinestatic

Hangman player choice options.

Definition at line 589 of file Globals.hpp.

◆ G_HANGMAN_PLAYER_CHOICE_OPTIONS

const std::vector<std::string> TerminalGames::Globals::G_HANGMAN_PLAYER_CHOICE_OPTIONS = {G_HANGMAN_GUESSER, G_HANGMAN_WORD_SETTER}
inlinestatic

Hangman player choice options.

Definition at line 590 of file Globals.hpp.

◆ G_HANGMAN_NUMBER_OF_COMPUTER_WORDS

const uint32_t TerminalGames::Globals::G_HANGMAN_NUMBER_OF_COMPUTER_WORDS = 972
inlinestatic

Hangman computer word list for when the computer is asked to chose a word to be guessed.

Definition at line 597 of file Globals.hpp.

◆ G_HANGMAN_COMPUTER_WORDS

const std::array<std::string, G_HANGMAN_NUMBER_OF_COMPUTER_WORDS> TerminalGames::Globals::G_HANGMAN_COMPUTER_WORDS
inlinestatic

Hangman computer word list for when the computer is asked to chose a word to be guessed.

Definition at line 598 of file Globals.hpp.

◆ G_BATTLESHIPS_BOARD_WIDTH

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_BOARD_WIDTH = 10
inlinestatic

Battleships board attributes.

Definition at line 1576 of file Globals.hpp.

◆ G_BATTLESHIPS_BOARD_HEIGHT

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_BOARD_HEIGHT = 10
inlinestatic

Battleships board attributes.

Definition at line 1577 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_ELEMENT_WIDTH

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_GRID_ELEMENT_WIDTH = 3
inlinestatic

Battleships board attributes.

Definition at line 1578 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_ELEMENT_HEIGHT

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_GRID_ELEMENT_HEIGHT = 1
inlinestatic

Battleships board attributes.

Definition at line 1579 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_PLAYER_ONE_BOARD_LEFT_PAD

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_GRID_PLAYER_ONE_BOARD_LEFT_PAD = 8
inlinestatic

Battleships board attributes.

Definition at line 1580 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_PLAYER_TWO_BOARD_LEFT_PAD

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_GRID_PLAYER_TWO_BOARD_LEFT_PAD = 101
inlinestatic

Battleships board attributes.

Definition at line 1581 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_TOP_PAD

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_GRID_TOP_PAD = 8
inlinestatic

Battleships board attributes.

Definition at line 1582 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, G_PAGE_GRID_HORIZONTAL_LINE)
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1589 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_TOP_LINE_TOP_LEFT

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_TOP_LINE_TOP_LEFT = std::string(1, G_PAGE_GRID_TOP_LEFT) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1591 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_TOP_LINE_MIDDLE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_TOP_LINE_MIDDLE = std::string(1, G_PAGE_GRID_T) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1592 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_MIDDLE_LINE_LEFT

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_MIDDLE_LINE_LEFT = std::string(1, G_PAGE_GRID_LEFT_SIDEWAYS_T) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1594 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_MIDDLE_LINE_MIDDLE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_MIDDLE_LINE_MIDDLE = std::string(1, G_PAGE_GRID_INTERSECTION) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1595 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_BOTTOM_LINE_BOTTOM_LEFT

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_BOTTOM_LINE_BOTTOM_LEFT = std::string(1, G_PAGE_GRID_BOTTOM_LEFT) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1597 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_BOTTOM_LINE_MIDDLE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_BOTTOM_LINE_MIDDLE = std::string(1, G_PAGE_GRID_UPSIDE_DOWN_T) + G_BATTLESHIPS_GRID_ITEM_HORIZONTAL_LINE
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1598 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_TOP_LINE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_TOP_LINE = G_BATTLESHIPS_GRID_TOP_LINE_TOP_LEFT + RepeatString(G_BATTLESHIPS_BOARD_WIDTH, G_BATTLESHIPS_GRID_TOP_LINE_MIDDLE) + std::string(1, G_PAGE_GRID_TOP_RIGHT)
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1600 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_MIDDLE_LINE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_MIDDLE_LINE = G_BATTLESHIPS_GRID_MIDDLE_LINE_LEFT + RepeatString(G_BATTLESHIPS_BOARD_WIDTH, G_BATTLESHIPS_GRID_MIDDLE_LINE_MIDDLE) + std::string(1, G_PAGE_GRID_RIGHT_SIDEWAYS_T)
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1601 of file Globals.hpp.

◆ G_BATTLESHIPS_GRID_BOTTOM_LINE

const std::string TerminalGames::Globals::G_BATTLESHIPS_GRID_BOTTOM_LINE = G_BATTLESHIPS_GRID_BOTTOM_LINE_BOTTOM_LEFT + RepeatString(G_BATTLESHIPS_BOARD_WIDTH, G_BATTLESHIPS_GRID_BOTTOM_LINE_MIDDLE) + std::string(1, G_PAGE_GRID_BOTTOM_RIGHT)
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1602 of file Globals.hpp.

◆ G_BATTLESHIPS_LETTER_OFFSET

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_LETTER_OFFSET = 65
inlinestatic

Battleships board constants used to construct the board.

Definition at line 1604 of file Globals.hpp.

◆ G_BATTLESHIPS_EMPTY_GRID_VALUE

const std::string TerminalGames::Globals::G_BATTLESHIPS_EMPTY_GRID_VALUE = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, ' ')
inlinestatic

Battleships board values.

Definition at line 1611 of file Globals.hpp.

◆ G_BATTLESHIPS_MISSED_ATTACK

const std::string TerminalGames::Globals::G_BATTLESHIPS_MISSED_ATTACK = std::string(1, ' ') + G_PAGE_CENTRAL_DOT + ' '
inlinestatic

Battleships board values.

Definition at line 1612 of file Globals.hpp.

◆ G_BATTLESHIPS_SHIP_PRESENT

const std::string TerminalGames::Globals::G_BATTLESHIPS_SHIP_PRESENT = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, G_PAGE_DARK_HASH)
inlinestatic

Battleships board values.

Definition at line 1613 of file Globals.hpp.

◆ G_BATTLESHIPS_SUCCESSFUL_ATTACK

const std::string TerminalGames::Globals::G_BATTLESHIPS_SUCCESSFUL_ATTACK = std::string(G_BATTLESHIPS_GRID_ELEMENT_WIDTH, G_PAGE_LIGHT_HASH)
inlinestatic

Battleships board values.

Definition at line 1614 of file Globals.hpp.

◆ G_BATTLESHIPS_PLAYER_ONE

const std::string TerminalGames::Globals::G_BATTLESHIPS_PLAYER_ONE = "Player One"
inlinestatic

Battleships player choice options.

Definition at line 1621 of file Globals.hpp.

◆ G_BATTLESHIPS_PLAYER_TWO

const std::string TerminalGames::Globals::G_BATTLESHIPS_PLAYER_TWO = "Player Two"
inlinestatic

Battleships player choice options.

Definition at line 1622 of file Globals.hpp.

◆ G_BATTLESHIPS_PLAYER_CHOICE_OPTIONS

const std::array<std::string, G_GAME_TWO_OPTIONS> TerminalGames::Globals::G_BATTLESHIPS_PLAYER_CHOICE_OPTIONS = {G_BATTLESHIPS_PLAYER_ONE, G_BATTLESHIPS_PLAYER_TWO}
inlinestatic

Battleships player choice options.

Definition at line 1623 of file Globals.hpp.

◆ G_BATTLESHIPS_SHIP_COUNT

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_SHIP_COUNT = 5
inlinestatic

Battleships number of ships for each board/player.

Definition at line 1629 of file Globals.hpp.

◆ G_BATTLESHIPS_CARRIER_SIZE

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_CARRIER_SIZE = 5
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1635 of file Globals.hpp.

◆ G_BATTLESHIPS_BATTLESHIP_SIZE

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_BATTLESHIP_SIZE = 4
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1636 of file Globals.hpp.

◆ G_BATTLESHIPS_DESTROYER_SIZE

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_DESTROYER_SIZE = 3
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1637 of file Globals.hpp.

◆ G_BATTLESHIPS_SUBMARINE_SIZE

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_SUBMARINE_SIZE = 3
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1638 of file Globals.hpp.

◆ G_BATTLESHIPS_PATROL_BOAT_SIZE

const uint32_t TerminalGames::Globals::G_BATTLESHIPS_PATROL_BOAT_SIZE = 2
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1639 of file Globals.hpp.

◆ G_BATTLESHIPS_CARRIER_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_CARRIER_NAME = "Carrier"
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1641 of file Globals.hpp.

◆ G_BATTLESHIPS_BATTLESHIP_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_BATTLESHIP_NAME = "Battleship"
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1642 of file Globals.hpp.

◆ G_BATTLESHIPS_DESTROYER_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_DESTROYER_NAME = "Destroyer"
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1643 of file Globals.hpp.

◆ G_BATTLESHIPS_SUBMARINE_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_SUBMARINE_NAME = "Submarine"
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1644 of file Globals.hpp.

◆ G_BATTLESHIPS_PATROL_BOAT_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_PATROL_BOAT_NAME = "Patrol Boat"
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1645 of file Globals.hpp.

◆ G_BATTLESHIPS_CARRIER_PLACED_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_CARRIER_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_CARRIER_NAME
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1647 of file Globals.hpp.

◆ G_BATTLESHIPS_BATTLESHIP_PLACED_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_BATTLESHIP_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_BATTLESHIP_NAME
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1648 of file Globals.hpp.

◆ G_BATTLESHIPS_DESTROYER_PLACED_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_DESTROYER_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_DESTROYER_NAME
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1649 of file Globals.hpp.

◆ G_BATTLESHIPS_SUBMARINE_PLACED_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_SUBMARINE_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_SUBMARINE_NAME
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1650 of file Globals.hpp.

◆ G_BATTLESHIPS_PATROL_BOAT_PLACED_NAME

const std::string TerminalGames::Globals::G_BATTLESHIPS_PATROL_BOAT_PLACED_NAME = G_BATTLESHIPS_SHIP_PRESENT + G_BATTLESHIPS_PATROL_BOAT_NAME
inlinestatic

Battleships ship-related constants used in later arrays.

Definition at line 1651 of file Globals.hpp.

◆ G_BATTLESHIPS_SHIP_INSTRUCTIONS

const std::array<std::string, G_BATTLESHIPS_SHIP_COUNT> TerminalGames::Globals::G_BATTLESHIPS_SHIP_INSTRUCTIONS
inlinestatic
Initial value:
= {
"Please enter the " + std::to_string(G_BATTLESHIPS_CARRIER_SIZE) + " grid locations for the Carrier",
"Please enter the " + std::to_string(G_BATTLESHIPS_BATTLESHIP_SIZE) + " grid locations for the Battleship",
"Please enter the " + std::to_string(G_BATTLESHIPS_DESTROYER_SIZE) + " grid locations for the Destroyer",
"Please enter the " + std::to_string(G_BATTLESHIPS_SUBMARINE_SIZE) + " grid locations for the Submarine",
"Please enter the " + std::to_string(G_BATTLESHIPS_PATROL_BOAT_SIZE) + " grid locations for the Patrol Boat",
}
static const uint32_t G_BATTLESHIPS_SUBMARINE_SIZE
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1638
static const uint32_t G_BATTLESHIPS_PATROL_BOAT_SIZE
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1639
static const uint32_t G_BATTLESHIPS_BATTLESHIP_SIZE
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1636
static const uint32_t G_BATTLESHIPS_DESTROYER_SIZE
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1637
static const uint32_t G_BATTLESHIPS_CARRIER_SIZE
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1635

Battleships list of instructions use when asking the user for the grid locations for their ships.

Definition at line 1657 of file Globals.hpp.

◆ G_BATTLESHIPS_SHIP_NAMES

const std::array<std::string, G_BATTLESHIPS_SHIP_COUNT> TerminalGames::Globals::G_BATTLESHIPS_SHIP_NAMES
inlinestatic
Initial value:
= {
}
static const std::string G_BATTLESHIPS_PATROL_BOAT_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1645
static const std::string G_BATTLESHIPS_BATTLESHIP_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1642
static const std::string G_BATTLESHIPS_DESTROYER_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1643
static const std::string G_BATTLESHIPS_SUBMARINE_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1644
static const std::string G_BATTLESHIPS_CARRIER_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1641

Battleships list of ship names.

Definition at line 1668 of file Globals.hpp.

◆ G_BATTLESHIPS_SHIP_PLACED_NAMES

const std::array<std::string, G_BATTLESHIPS_SHIP_COUNT> TerminalGames::Globals::G_BATTLESHIPS_SHIP_PLACED_NAMES
inlinestatic
Initial value:
= {
}
static const std::string G_BATTLESHIPS_DESTROYER_PLACED_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1649
static const std::string G_BATTLESHIPS_BATTLESHIP_PLACED_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1648
static const std::string G_BATTLESHIPS_PATROL_BOAT_PLACED_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1651
static const std::string G_BATTLESHIPS_SUBMARINE_PLACED_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1650
static const std::string G_BATTLESHIPS_CARRIER_PLACED_NAME
Battleships ship-related constants used in later arrays.
Definition Globals.hpp:1647

Battleships list of ship names when placed on a board.

Definition at line 1679 of file Globals.hpp.

◆ G_BATTLESHIPS_SHIP_SIZES

const std::array<uint32_t, G_BATTLESHIPS_SHIP_COUNT> TerminalGames::Globals::G_BATTLESHIPS_SHIP_SIZES
inlinestatic