ColorShapeLinks AI
An AI competition for the IEEE Conference on Games 2021
Piece Struct Reference

Represents a board piece. More...

+ Collaboration diagram for Piece:

Public Member Functions

 Piece (PColor color, PShape shape)
 Create a new piece. More...
 
bool Is (PColor color, PShape shape)
 Is the piece of the specified color and shape? More...
 
override string ToString ()
 Provides a string representation of the piece in the form "ColorShape". More...
 

Public Attributes

readonly PColor color
 The piece color. More...
 
readonly PShape shape
 The piece shape. More...
 

Detailed Description

Represents a board piece.

Constructor & Destructor Documentation

◆ Piece()

Piece ( PColor  color,
PShape  shape 
)
inline

Create a new piece.

Parameters
colorThe piece color.
shapeThe piece shape.

Member Function Documentation

◆ Is()

bool Is ( PColor  color,
PShape  shape 
)

Is the piece of the specified color and shape?

Parameters
colorThe piece color.
shapeThe piece shape.
Returns
true if the piece has the specified color and shape, false otherwise.

◆ ToString()

override string ToString ( )

Provides a string representation of the piece in the form "ColorShape".

Returns
A string representation of the piece.

Member Data Documentation

◆ color

readonly PColor color

The piece color.

◆ shape

readonly PShape shape

The piece shape.


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