|
Cute Chess
0.1
|
The side or color of a chess player. More...
#include <side.h>
Public Types | |
| enum | Type { White, Black, NoSide } |
Public Member Functions | |
| bool | isNull () const |
| operator Type () const | |
| Side | opposite () const |
| Side () | |
| Side (Type type) | |
| Side (const QString &symbol) | |
| QString | symbol () const |
| QString | toString () const |
The side or color of a chess player.
This class is a simple wrapper for the enumerated type Side::Type. Side objects can be used just like one would use an enum type (eg. as an array index).
| enum Chess::Side::Type |
|
inline |
Constructs a new, null Side object.
|
explicit |
Constructs a new Side object from a symbol.
The symbol can be "w" for White, "b" for Black, or anything else for NoSide.
|
inline |
Returns true if the side is NoSide.
|
inline |
Operator for the Type value of the side.
|
inline |
Returns the opposite side.
| QString Chess::Side::symbol | ( | ) | const |
Returns the text symbol for the side.
| QString Chess::Side::toString | ( | ) | const |
Returns a localized name of the side.
1.8.11