20 #ifndef __MINIGAMEBOARD_H 21 #define __MINIGAMEBOARD_H 41 #define GAMEBOARD_MIN_PLAYERS 1 42 #define GAMEBOARD_MAX_PLAYERS 2 43 #define GAMEBOARD_DEFAULT_PLAYERS 2 123 const char* defLayout,
const char* defPieces,
124 const uint8_t defPlayers,
const int16_t options);
147 void PackLayoutString(
const char* layoutStr, uint8_t* packedLayout);
150 uint8_t PackPiece(
char pieceStr);
155 return gameboardOptions;
159 bool DetermineGameRules(csString rulesXMLstr, csString name);
162 bool DetermineEndgameSpecs(csString endgameXMLstr, csString name);
196 int16_t gameboardOptions;
204 int moveDistanceRule;
207 csArray<Endgame_Spec*> endgames;
232 return gameBoardDef->cols;
238 return gameBoardDef->rows;
250 return gameBoardDef->numPieces;
256 return gameBoardDef->piecesSize;
262 return gameBoardDef->pieces;
266 uint8_t Get(uint8_t
col, uint8_t
row)
const;
269 void Set(uint8_t col, uint8_t row, uint8_t state);
274 return gameBoardDef->numPlayers;
280 return gameBoardDef->playerTurnRule;
284 return gameBoardDef->movePieceTypeRule;
288 return gameBoardDef->moveablePiecesRule;
292 return gameBoardDef->movePiecesToRule;
296 return gameBoardDef->moveDirectionRule;
300 return gameBoardDef->moveDistanceRule;
uint8_t GetRows() const
Returns the number of rows.
Endgame_TileType
structs & types used to specify endgames of minigames, to recognise specific patterns of played piece...
Endgame_TileType sourceTile
Rule_MovePiecesTo GetMovePiecesToRule(void)
Rule_PlayerTurn
Following enums define values to represent simple game rules.
Wrapper class for game board.
uint8_t * GetPieces() const
Returns the package list of available pieces.
uint8_t GetCols() const
Returns the number of columns.
uint8_t GetCols() const
Returns the number of columns.
Game board definition class.
Rule_MoveDirection GetMoveDirectionRule(void)
uint8_t * GetLayout() const
Returns the packed game board layout.
uint8_t GetRows() const
Returns the number of rows.
This class collects data of a netclient.
Rule_PlayerTurn GetPlayerTurnRule(void)
return Game rules
uint16_t GetGameboardOptions(void)
returns gameboard layout options
int GetLayoutSize() const
returns layout size
int GetMoveDistanceRule(void)
Rule_MovePieceType GetMovePieceTypeRule(void)
void ClearOutEndgames(void)
clear endgame settings away
uint8_t GetNumPieces() const
Returns the number of available pieces.
uint8_t GetNumPlayers(void)
returns number of players
uint8_t GetPiecesSize() const
Returns the number of available pieces.
csArray< Endgame_TileSpec * > endgameTiles
Rule_MoveablePieces GetMoveablePiecesRule(void)