ChessEntities is a collection of useful constants.
 
Layouts of the dotKnight chess boards
 
Piece Values
 
White pieces range in value from 1 thru 6, Black pieces range in value from 7 thru 12. Please note these values are NOT used to evaluate a poistion. These simply identify piece types.
 
PieceType Value
EmptySquare 0
Knight 1
Bishop 2
Rook 3
Queen 4
King 5
Pawn 6
 
Piece Values for Evaluation
 
These values ARE used to evaluate a position. A pawn is equal to 100 PVU (Position Value Units).
 
PieceType Value
EmptySquareValue 0
PawnValue 100
KnightValue 300
BishopValue 300
RookValue 500
QueenValue 900
KingValue 32767
 
Miscellaneous Constants
 
These constants help to improve the readability of the source.
 
Constant Value
NoSquare 255
NoCapture -32767
NoPiece 0
NUMSQUARES 64
NUMRANKS 8
NUMFILES 8
ONERANK 8
 
Rank and File Masks
 
These constants are used to isolate certain parts of the chess board.
 
Board Binary Value   Board Binary Value   Board Binary Value   Board Binary Value
BoardWithNoAFile
11111110
11111110
11111110
11111110
11111110
11111110
11111110
11111110
  BoardWithNoBFile
11111101
11111101
11111101
11111101
11111101
11111101
11111101
11111101
  BoardWithNoCFile
11111011
11111011
11111011
11111011
11111011
11111011
11111011
11111011
  BoardWithNoDFile
11110111
11110111
11110111
11110111
11110111
11110111
11110111
11110111
Board Binary Value   Board Binary Value   Board Binary Value   Board Binary Value
BoardWithNoEFile
11101111
11101111
11101111
11101111
11101111
11101111
11101111
11101111
  BoardWithNoFFile
11011111
11011111
11011111
11011111
11011111
11011111
11011111
11011111
  BoardWithNoGFile
10111111
10111111
10111111
10111111
10111111
10111111
10111111
10111111
  BoardWithNoHFile
01111111
01111111
01111111
01111111
01111111
01111111
01111111
01111111
 
Board Binary Value   Board Binary Value   Board Binary Value   Board Binary Value
BoardOnlyAFile
00000001
00000001
00000001
00000001
00000001
00000001
00000001
00000001
  BoardOnlyBFile
00000010
00000010
00000010
00000010
00000010
00000010
00000010
00000010
  BoardOnlyCFile
00000100
00000100
00000100
00000100
00000100
00000100
00000100
00000100
  BoardOnlyDFile
00001000
00001000
00001000
00001000
00001000
00001000
00001000
00001000
BoardOnlyEFile
00010000
00010000
00010000
00010000
00010000
00010000
00010000
00010000
  BoardOnlyFFile
00100000
00100000
00100000
00100000
00100000
00100000
00100000
00100000
  BoardOnlyGFile
01000000
01000000
01000000
01000000
01000000
01000000
01000000
01000000
  BoardOnlyHFile
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
 
Board Binary Value   Board Binary Value   Board Binary Value   Board Binary Value
BoardWithNo1stRank
00000000
11111111
11111111
11111111
11111111
11111111
11111111
11111111
  BoardWithNo2ndRank
11111111
00000000
11111111
11111111
11111111
11111111
11111111
11111111
  BoardWithNo3rdRank
11111111
11111111
00000000
11111111
11111111
11111111
11111111
11111111
  BoardWithNo4thRank
11111111
11111111
11111111
00000000
11111111
11111111
11111111
11111111
BoardWithNo5thRank
11111111
11111111
11111111
11111111
00000000
11111111
11111111
11111111
  BoardWithNo6thRank
11111111
11111111
11111111
11111111
11111111
00000000
11111111
11111111
  BoardWithNo7thRank
11111111
11111111
11111111
11111111
11111111
11111111
00000000
11111111
  BoardWithNo8thRank
11111111
11111111
11111111
11111111
11111111
11111111
11111111
00000000
 
Board Binary Value   Board Binary Value   Board Binary Value   Board Binary Value
BoardOnly1stRank
11111111
00000000
00000000
00000000
00000000
00000000
00000000
00000000
  BoardOnly2ndRank
00000000
11111111
00000000
00000000
00000000
00000000
00000000
00000000
  BoardOnly3rdRank
00000000
00000000
11111111
00000000
00000000
00000000
00000000
00000000
  BoardOnly4thRank
00000000
00000000
00000000
11111111
00000000
00000000
00000000
00000000
BoardOnly5thRank
00000000
00000000
00000000
00000000
11111111
00000000
00000000
00000000
  BoardOnly6thRank
00000000
00000000
00000000
00000000
00000000
11111111
00000000
00000000
  BoardOnly7thRank
00000000
00000000
00000000
00000000
00000000
00000000
11111111
00000000
  BoardOnly8thRank
00000000
00000000
00000000
00000000
00000000
00000000
00000000
11111111
 
Board Binary Value   Board Binary Value   Board Binary Value
BoardOnlyCenter
00000000
00000000
00000000
00011000
00011000
00000000
00000000
00000000
  BoardOnlyLightSquares
10101010
01010101
10101010
01010101
10101010
01010101
10101010
01010101
  BoardOnlyDarkSquares
01010101
10101010
01010101
10101010
01010101
10101010
01010101
10101010