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

A container for multiple gameboard::Move objects. More...

#include <move_data_structs.hpp>

Collaboration diagram for gameboard::MoveCollection:
Collaboration graph

Public Member Functions

 MoveCollection ()
 
 MoveCollection (vector< Move > my_moves)
 
 MoveCollection (size_t reserve_size)
 
size_t Size () const
 
bool IsEmpty () const
 
bool ContainsMove (const Move &move) const
 
bool ContainsAnyMoveNotIn (const MoveCollection &other) const
 
Move SelectRandom ()
 
bool ContainsDestination (const gameboard::BoardSpace &space)
 
void Append (Move move)
 
void Concat (vector< Move > other_moves)
 
void Concat (MoveCollection other)
 

Public Attributes

vector< Movemoves
 

Detailed Description

A container for multiple gameboard::Move objects.

Typically used to either hold every gameboard::Move that could be made given a particular state of a gameboard::GameBoard, or a collection of the best gameboard::Move objects, as determined by a MoveEvaluator.

Definition at line 31 of file move_data_structs.hpp.

Constructor & Destructor Documentation

◆ MoveCollection() [1/3]

gameboard::MoveCollection::MoveCollection ( )
inline

Definition at line 33 of file move_data_structs.hpp.

◆ MoveCollection() [2/3]

gameboard::MoveCollection::MoveCollection ( vector< Move my_moves)
inline

Definition at line 35 of file move_data_structs.hpp.

◆ MoveCollection() [3/3]

gameboard::MoveCollection::MoveCollection ( size_t  reserve_size)
inline

Definition at line 37 of file move_data_structs.hpp.

Member Function Documentation

◆ Append()

void gameboard::MoveCollection::Append ( Move  move)
inline

Definition at line 78 of file move_data_structs.hpp.

◆ Concat() [1/2]

void gameboard::MoveCollection::Concat ( MoveCollection  other)
inline

Definition at line 82 of file move_data_structs.hpp.

◆ Concat() [2/2]

void gameboard::MoveCollection::Concat ( vector< Move other_moves)
inline

Definition at line 79 of file move_data_structs.hpp.

◆ ContainsAnyMoveNotIn()

bool gameboard::MoveCollection::ContainsAnyMoveNotIn ( const MoveCollection other) const
inline

Definition at line 55 of file move_data_structs.hpp.

◆ ContainsDestination()

bool gameboard::MoveCollection::ContainsDestination ( const gameboard::BoardSpace space)
inline

Definition at line 69 of file move_data_structs.hpp.

◆ ContainsMove()

bool gameboard::MoveCollection::ContainsMove ( const Move move) const
inline

Definition at line 46 of file move_data_structs.hpp.

◆ IsEmpty()

bool gameboard::MoveCollection::IsEmpty ( ) const
inline

Definition at line 44 of file move_data_structs.hpp.

◆ SelectRandom()

Move gameboard::MoveCollection::SelectRandom ( )
inline

Definition at line 64 of file move_data_structs.hpp.

◆ Size()

size_t gameboard::MoveCollection::Size ( ) const
inline

Definition at line 42 of file move_data_structs.hpp.

Member Data Documentation

◆ moves

vector<Move> gameboard::MoveCollection::moves

Definition at line 32 of file move_data_structs.hpp.


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