cwchess::TypeData Struct Reference

The POD base type of class Type. More...

#include <Type.h>

Inheritance diagram for cwchess::TypeData:

List of all members.

Public Attributes

uint8_t M_bits
 00000STT, where STT is the type. If S == 1 then the piece is a slider.

Detailed Description

The POD base type of class Type.

This class uses the same internal type as Code to store the type bits. It even uses the same bits (the three least significant bits). All other bits are garanteed zero.

If the third bit is set then the object represents a sliding piece (bishop, rook or queen). If in addition the first bit is set it can moves like a bishop (bishop and queen), or if the second bit is set it can move like a rook (rook and queen).

See also:
Type, nothing, pawn, knight, king, bishop, rook, queen

Definition at line 49 of file Type.h.


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

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