cwchess::Type Class Reference

A chess piece type. More...

#include <Type.h>

Inheritance diagram for cwchess::Type:

List of all members.

Public Member Functions

Constructors

 Type (void)
 Construct an uninitialized Type.
 Type (Type const& type)
 Copy-constructor.
 Type (TypeData type)
 Construct a Type from a constant.
Assignment operators

Type&  operator= (Type const& type)
 Assign from another Type.
Type&  operator= (TypeData type)
 Assign from a constant.
Accessors

bool is_a_slider (void) const
 Returns TRUE if the type is a bishop, rook or queen.
bool is_a_rookmover (void) const
 Returns TRUE if the type is a rook or queen.
bool is_a_bishopmover (void) const
 Returns TRUE if the type is a bishop or queen.
uint8_t operator() (void) const
 Return the underlaying integral value.

Friends

class Code
Comparison operators

bool operator== (Type const& t1, Type const& t2)
bool operator== (Type const& t1, TypeData t2)
bool operator== (TypeData t1, Type const& t2)
bool operator!= (Type const& t1, Type const& t2)
bool operator!= (Type const& t1, TypeData t2)
bool operator!= (TypeData t1, Type const& t2)

Detailed Description

A chess piece type.

This class represents a chess piece type.

The class Code is a friend of this class.

Definition at line 87 of file Type.h.


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

Copyright © 2006 - 2010 Carlo Wood.  All rights reserved.