Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
MaterialCount Class Reference

Store the number of pieces for each type and color. More...

#include <fastgame.h>

Public Member Functions

void incr (colorT color, pieceT piece_type)
 Add one piece. More...
 
void decr (colorT color, pieceT piece_type)
 Subtract one piece. More...
 
int8_t count (colorT color) const
 Return the total number of pieces of the specified color. More...
 
int8_t count (colorT color, pieceT piece_type) const
 Return the number of pieces of the specified color and type. More...
 
bool operator== (const MaterialCount &b) const
 
bool operator!= (const MaterialCount &b) const
 

Detailed Description

Store the number of pieces for each type and color.

Definition at line 33 of file fastgame.h.

Member Function Documentation

◆ count() [1/2]

int8_t MaterialCount::count ( colorT  color) const
inline

Return the total number of pieces of the specified color.

Definition at line 56 of file fastgame.h.

◆ count() [2/2]

int8_t MaterialCount::count ( colorT  color,
pieceT  piece_type 
) const
inline

Return the number of pieces of the specified color and type.

Definition at line 63 of file fastgame.h.

◆ decr()

void MaterialCount::decr ( colorT  color,
pieceT  piece_type 
)
inline

Subtract one piece.

Definition at line 47 of file fastgame.h.

◆ incr()

void MaterialCount::incr ( colorT  color,
pieceT  piece_type 
)
inline

Add one piece.

Definition at line 38 of file fastgame.h.

◆ operator!=()

bool MaterialCount::operator!= ( const MaterialCount b) const
inline

Definition at line 76 of file fastgame.h.

◆ operator==()

bool MaterialCount::operator== ( const MaterialCount b) const
inline

Definition at line 70 of file fastgame.h.


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