Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
gameboard::BoardSpace Struct Reference

A pair of coordinate (rank, and file) with properties determined by comparison with values of gameboard features: board size, river locations, and castle locations. More...

#include <board_data_structs.hpp>

Collaboration diagram for gameboard::BoardSpace:
Collaboration graph

Public Member Functions

bool IsOnBoard () const
 
bool IsInHomelandOf (const PieceColor color) const
 
bool IsInCastleOf (const PieceColor color) const
 
BoardSpace operator+ (const BoardDirection direction) const
 
bool operator== (const BoardSpace other) const
 
bool operator!= (const BoardSpace other) const
 

Public Attributes

BoardIndexType rank
 
BoardIndexType file
 

Detailed Description

A pair of coordinate (rank, and file) with properties determined by comparison with values of gameboard features: board size, river locations, and castle locations.

Definition at line 51 of file board_data_structs.hpp.

Member Function Documentation

◆ IsInCastleOf()

bool gameboard::BoardSpace::IsInCastleOf ( const PieceColor  color) const
inline

Definition at line 68 of file board_data_structs.hpp.

◆ IsInHomelandOf()

bool gameboard::BoardSpace::IsInHomelandOf ( const PieceColor  color) const
inline

Definition at line 59 of file board_data_structs.hpp.

◆ IsOnBoard()

bool gameboard::BoardSpace::IsOnBoard ( ) const
inline

Definition at line 55 of file board_data_structs.hpp.

◆ operator!=()

bool gameboard::BoardSpace::operator!= ( const BoardSpace  other) const
inline

Definition at line 83 of file board_data_structs.hpp.

◆ operator+()

BoardSpace gameboard::BoardSpace::operator+ ( const BoardDirection  direction) const
inline

Definition at line 75 of file board_data_structs.hpp.

◆ operator==()

bool gameboard::BoardSpace::operator== ( const BoardSpace  other) const
inline

Definition at line 79 of file board_data_structs.hpp.

Member Data Documentation

◆ file

BoardIndexType gameboard::BoardSpace::file

Definition at line 53 of file board_data_structs.hpp.

◆ rank

BoardIndexType gameboard::BoardSpace::rank

Definition at line 53 of file board_data_structs.hpp.


The documentation for this struct was generated from the following file: