SquareLogic extension

Contains methods for dealing with the internal anatomy of the square representation.

on

Properties

colour int
Colour only.
no setter
flags int
Flags only.
no setter
hasInternalType bool
Whether there is an internal type.
no setter
inInitialState bool
no setter
internalType int
Internal type only.
no setter
isEmpty bool
Whether there is a piece.
no setter
isNotEmpty bool
Whether there isn't a piece.
no setter
piece int
Colour and piece type.
no setter
type int
Piece type only.
no setter

Methods

flipColour() int
hasBit(int bit) bool
hasFlag(int flag) bool
removeFlags() int
setBit(int bit) int
setFlag(int flag) int
setInitialState(bool initial) int
setInternalType(int type) int
toggleBit(int bit) int
toggleFlag(int flag) int
unsetBit(int bit) int
unsetFlag(int flag) int