Scid  4.6.5
Macros | Typedefs | Enumerations | Functions | Variables
common.h File Reference
#include <cstddef>
#include <stdint.h>
#include "error.h"
#include <assert.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CPP11_SUPPORT   0
 
#define BBUF_SIZE   256000
 
#define ASSERT(f)   assert(f)
 
#define BIT_7(x)   ((x) & 128)
 
#define BIT_6(x)   ((x) & 64)
 
#define BIT_5(x)   ((x) & 32)
 
#define BIT_4(x)   ((x) & 16)
 
#define BIT_3(x)   ((x) & 8)
 
#define BIT_2(x)   ((x) & 4)
 
#define BIT_1(x)   ((x) & 2)
 
#define BIT_0(x)   ((x) & 1)
 
#define UPPER_4_BITS(x)   (((x) & 240) >> 4)
 
#define LOWER_4_BITS(x)   ((x) & 15)
 
#define UPPER_12_BITS(x)   (((x) & (4096 * 4095)) >> 12)
 
#define LOWER_12_BITS(x)   ((x) & 4095)
 

Typedefs

typedef unsigned short versionT
 
typedef unsigned char byte
 
typedef uint16_t ushort
 
typedef uint32_t uint
 
typedef int32_t sint
 
typedef signed int compareT
 
typedef byte pieceT
 
typedef byte colorT
 
typedef byte squareT
 
typedef byte directionT
 
typedef byte rankT
 
typedef byte fyleT
 
typedef byte leftDiagT
 
typedef byte rightDiagT
 
typedef pieceT boardT[66]
 
typedef byte smallBoardT[32]
 
typedef byte castleDirT
 
typedef ushort statusT
 
typedef char sanStringT[10]
 
typedef char fileNameT[512]
 
typedef uint fileLengthT
 
typedef uint dateT
 
typedef uint gamenumT
 
typedef ushort eloT
 
typedef ushort ecoT
 
typedef char ecoStringT[6]
 
typedef byte resultT
 

Enumerations

enum  fileModeT {
  FMODE_None = 0, FMODE_ReadOnly, FMODE_WriteOnly, FMODE_Both,
  FMODE_Create, FMODE_Memory
}
 

Functions

colorT color_Flip (colorT c)
 
char color_Char (colorT c)
 
colorT piece_Color (pieceT p)
 
colorT piece_Color_NotEmpty (pieceT p)
 
pieceT piece_Type (pieceT p)
 
pieceT piece_Make (colorT c, pieceT p)
 
bool piece_IsWhite (pieceT p)
 
bool piece_IsBlack (pieceT p)
 
bool piece_IsKing (pieceT p)
 
bool piece_IsQueen (pieceT p)
 
bool piece_IsRook (pieceT p)
 
bool piece_IsBishop (pieceT p)
 
bool piece_IsKnight (pieceT p)
 
bool piece_IsPawn (pieceT p)
 
bool piece_IsSlider (pieceT p)
 
char piece_Char (pieceT p)
 
pieceT piece_FromChar (char x)
 
int piece_Value (pieceT p)
 
rankT rank_FromChar (char c)
 
fyleT fyle_FromChar (char c)
 
squareT square_Make (fyleT f, rankT r)
 
fyleT square_Fyle (squareT sq)
 
rankT square_Rank (squareT sq)
 
leftDiagT square_LeftDiag (squareT sq)
 
rightDiagT square_RightDiag (squareT sq)
 
colorT square_Color (squareT sq)
 
squareT square_FlipFyle (squareT sq)
 
squareT square_FlipRank (squareT sq)
 
squareT square_FlipDiag (squareT sq)
 
uint square_Distance (squareT from, squareT to)
 
squareT square_NearestCorner (squareT sq)
 
bool square_IsCornerSquare (squareT sq)
 
bool square_IsEdgeSquare (squareT sq)
 
int square_EdgeDistance (squareT sq)
 
bool square_IsKnightHop (squareT from, squareT to)
 
char square_FyleChar (squareT sq)
 
char square_RankChar (squareT sq)
 
void square_Print (squareT sq, char *str)
 
directionT direction_Opposite (directionT d)
 
bool direction_IsDiagonal (directionT dir)
 
int direction_Delta (directionT dir)
 
int board_Compare (const pieceT *b1, const pieceT *b2)
 
bool square_Adjacent (squareT from, squareT to)
 

Variables

const versionT SCID_VERSION = 400
 
const versionT SCID_OLDEST_VERSION = 300
 
const char SCID_VERSION_STRING [] = "4.6.5"
 
const char SCID_WEBSITE [] = "http://scid.sourceforge.net/"
 
const char GZIP_SUFFIX [] = ".gz"
 
const char ZIP_SUFFIX [] = ".zip"
 
const char PGN_SUFFIX [] = ".pgn"
 
const compareT LESS_THAN = -1
 
const compareT EQUAL_TO = 0
 
const compareT GREATER_THAN = 1
 
const ecoT ECO_None = 0
 
const byte RATING_Elo = 0
 
const byte RATING_Rating = 1
 
const byte RATING_Rapid = 2
 
const byte RATING_ICCF = 3
 
const byte RATING_USCF = 4
 
const byte RATING_DWZ = 5
 
const byte RATING_BCF = 6
 
const char * ratingTypeNames [17]
 
const uint NUM_RESULT_TYPES = 4
 
const resultT RESULT_None = 0
 
const resultT RESULT_White = 1
 
const resultT RESULT_Black = 2
 
const resultT RESULT_Draw = 3
 
const uint RESULT_SCORE [4] = { 1, 2, 0, 1 }
 
const char RESULT_CHAR [4] = { '*', '1', '0', '=' }
 
const char RESULT_STR [4][4] = { "*", "1-0", "0-1", "=-=" }
 
const char RESULT_LONGSTR [4][8] = { "*", "1-0", "0-1", "1/2-1/2" }
 
const resultT RESULT_OPPOSITE [4]
 
const uint NUM_COLOR_TYPES = 2
 
const colorT WHITE = 0
 
const colorT BLACK = 1
 
const colorT NOCOLOR = 2
 
const char COLOR_CHAR [3] = {'W', 'B', '_' }
 
const castleDirT QSIDE = 0
 
const castleDirT KSIDE = 1
 
const pieceT KING = 1
 
const pieceT QUEEN = 2
 
const pieceT ROOK = 3
 
const pieceT BISHOP = 4
 
const pieceT KNIGHT = 5
 
const pieceT PAWN = 6
 
const pieceT EMPTY = 7
 
const pieceT END_OF_BOARD = 0
 
const pieceT WK = 1
 
const pieceT WQ = 2
 
const pieceT WR = 3
 
const pieceT WB = 4
 
const pieceT WN = 5
 
const pieceT WP = 6
 
const pieceT BK = 9
 
const pieceT BQ = 10
 
const pieceT BR = 11
 
const pieceT BB = 12
 
const pieceT BN = 13
 
const pieceT BP = 14
 
const pieceT WM = 16
 
const pieceT BM = 17
 
const uint MAX_PIECE_TYPES = 18
 
const char PIECE_CHAR [] = "xKQRBNP.xkqrbnpxMm"
 
const pieceT PIECE_FLIP [MAX_PIECE_TYPES]
 
const bool PIECE_IS_SLIDER [8]
 
const int PIECE_VALUE [MAX_PIECE_TYPES]
 
const squareT A1 = 0
 
const squareT B1 = 1
 
const squareT C1 = 2
 
const squareT D1 = 3
 
const squareT E1 = 4
 
const squareT F1 = 5
 
const squareT G1 = 6
 
const squareT H1 = 7
 
const squareT A2 = 8
 
const squareT B2 = 9
 
const squareT C2 =10
 
const squareT D2 =11
 
const squareT E2 =12
 
const squareT F2 =13
 
const squareT G2 =14
 
const squareT H2 =15
 
const squareT A3 =16
 
const squareT B3 =17
 
const squareT C3 =18
 
const squareT D3 =19
 
const squareT E3 =20
 
const squareT F3 =21
 
const squareT G3 =22
 
const squareT H3 =23
 
const squareT A4 =24
 
const squareT B4 =25
 
const squareT C4 =26
 
const squareT D4 =27
 
const squareT E4 =28
 
const squareT F4 =29
 
const squareT G4 =30
 
const squareT H4 =31
 
const squareT A5 =32
 
const squareT B5 =33
 
const squareT C5 =34
 
const squareT D5 =35
 
const squareT E5 =36
 
const squareT F5 =37
 
const squareT G5 =38
 
const squareT H5 =39
 
const squareT A6 =40
 
const squareT B6 =41
 
const squareT C6 =42
 
const squareT D6 =43
 
const squareT E6 =44
 
const squareT F6 =45
 
const squareT G6 =46
 
const squareT H6 =47
 
const squareT A7 =48
 
const squareT B7 =49
 
const squareT C7 =50
 
const squareT D7 =51
 
const squareT E7 =52
 
const squareT F7 =53
 
const squareT G7 =54
 
const squareT H7 =55
 
const squareT A8 =56
 
const squareT B8 =57
 
const squareT C8 =58
 
const squareT D8 =59
 
const squareT E8 =60
 
const squareT F8 =61
 
const squareT G8 =62
 
const squareT H8 =63
 
const squareT COLOR_SQUARE = 64
 
const squareT NULL_SQUARE = 65
 
const squareT NS = 65
 
const rankT RANK_1 = 0
 
const rankT RANK_2 = 1
 
const rankT RANK_3 = 2
 
const rankT RANK_4 = 3
 
const rankT RANK_5 = 4
 
const rankT RANK_6 = 5
 
const rankT RANK_7 = 6
 
const rankT RANK_8 = 7
 
const rankT NO_RANK = 64
 
const fyleT A_FYLE = 0
 
const fyleT B_FYLE = 1
 
const fyleT C_FYLE = 2
 
const fyleT D_FYLE = 3
 
const fyleT E_FYLE = 4
 
const fyleT F_FYLE = 5
 
const fyleT G_FYLE = 6
 
const fyleT H_FYLE = 7
 
const fyleT NO_FYLE = 64
 
const uint rankFyleDist [64]
 
const int edgeDist [66]
 
const directionT NULL_DIR = 0
 
const directionT UP = 1
 
const directionT DOWN = 2
 
const directionT LEFT = 4
 
const directionT RIGHT = 8
 
const directionT UP_LEFT = (UP | LEFT)
 
const directionT UP_RIGHT = (UP | RIGHT)
 
const directionT DOWN_LEFT = (DOWN | LEFT)
 
const directionT DOWN_RIGHT = (DOWN | RIGHT)
 
const directionT dirOpposite [11]
 
const bool dirIsDiagonal [11]
 
const int dirDelta [11]
 
directionT sqDir [66][66]
 
const boardT START_BOARD
 
const colorT BOARD_SQUARECOLOR [66]
 

Macro Definition Documentation

#define ASSERT (   f)    assert(f)

Definition at line 67 of file common.h.

#define BBUF_SIZE   256000

Definition at line 42 of file common.h.

#define BIT_0 (   x)    ((x) & 1)

Definition at line 79 of file common.h.

#define BIT_1 (   x)    ((x) & 2)

Definition at line 78 of file common.h.

#define BIT_2 (   x)    ((x) & 4)

Definition at line 77 of file common.h.

#define BIT_3 (   x)    ((x) & 8)

Definition at line 76 of file common.h.

#define BIT_4 (   x)    ((x) & 16)

Definition at line 75 of file common.h.

#define BIT_5 (   x)    ((x) & 32)

Definition at line 74 of file common.h.

#define BIT_6 (   x)    ((x) & 64)

Definition at line 73 of file common.h.

#define BIT_7 (   x)    ((x) & 128)

Definition at line 72 of file common.h.

#define CPP11_SUPPORT   0

Definition at line 22 of file common.h.

#define LOWER_12_BITS (   x)    ((x) & 4095)

Definition at line 89 of file common.h.

#define LOWER_4_BITS (   x)    ((x) & 15)

Definition at line 84 of file common.h.

#define UPPER_12_BITS (   x)    (((x) & (4096 * 4095)) >> 12)

Definition at line 88 of file common.h.

#define UPPER_4_BITS (   x)    (((x) & 240) >> 4)

Definition at line 83 of file common.h.

Typedef Documentation

typedef pieceT boardT[66]

Definition at line 123 of file common.h.

typedef unsigned char byte

Definition at line 97 of file common.h.

typedef byte castleDirT

Definition at line 129 of file common.h.

typedef byte colorT

Definition at line 112 of file common.h.

typedef signed int compareT

Definition at line 105 of file common.h.

typedef uint dateT

Definition at line 155 of file common.h.

typedef byte directionT

Definition at line 114 of file common.h.

typedef char ecoStringT[6]

Definition at line 162 of file common.h.

typedef ushort ecoT

Definition at line 161 of file common.h.

typedef ushort eloT

Definition at line 160 of file common.h.

typedef uint fileLengthT

Definition at line 142 of file common.h.

typedef char fileNameT[512]

Definition at line 141 of file common.h.

typedef byte fyleT

Definition at line 116 of file common.h.

typedef uint gamenumT

Definition at line 159 of file common.h.

typedef byte leftDiagT

Definition at line 117 of file common.h.

typedef byte pieceT

Definition at line 111 of file common.h.

typedef byte rankT

Definition at line 115 of file common.h.

typedef byte resultT

Definition at line 183 of file common.h.

typedef byte rightDiagT

Definition at line 118 of file common.h.

typedef char sanStringT[10]

Definition at line 137 of file common.h.

typedef int32_t sint

Definition at line 100 of file common.h.

typedef byte smallBoardT[32]

Definition at line 125 of file common.h.

typedef byte squareT

Definition at line 113 of file common.h.

typedef ushort statusT

Definition at line 133 of file common.h.

typedef uint32_t uint

Definition at line 99 of file common.h.

typedef uint16_t ushort

Definition at line 98 of file common.h.

typedef unsigned short versionT

Definition at line 44 of file common.h.

Enumeration Type Documentation

enum fileModeT
Enumerator
FMODE_None 
FMODE_ReadOnly 
FMODE_WriteOnly 
FMODE_Both 
FMODE_Create 
FMODE_Memory 

Definition at line 144 of file common.h.

Function Documentation

int board_Compare ( const pieceT b1,
const pieceT b2 
)
inline

Definition at line 663 of file common.h.

char color_Char ( colorT  c)
inline

Definition at line 213 of file common.h.

colorT color_Flip ( colorT  c)
inline

Definition at line 210 of file common.h.

int direction_Delta ( directionT  dir)
inline

Definition at line 619 of file common.h.

bool direction_IsDiagonal ( directionT  dir)
inline

Definition at line 595 of file common.h.

directionT direction_Opposite ( directionT  d)
inline

Definition at line 572 of file common.h.

fyleT fyle_FromChar ( char  c)
inline

Definition at line 368 of file common.h.

char piece_Char ( pieceT  p)
inline

Definition at line 320 of file common.h.

colorT piece_Color ( pieceT  p)
inline

Definition at line 280 of file common.h.

colorT piece_Color_NotEmpty ( pieceT  p)
inline

Definition at line 284 of file common.h.

pieceT piece_FromChar ( char  x)
inline

Definition at line 323 of file common.h.

bool piece_IsBishop ( pieceT  p)
inline

Definition at line 308 of file common.h.

bool piece_IsBlack ( pieceT  p)
inline

Definition at line 296 of file common.h.

bool piece_IsKing ( pieceT  p)
inline

Definition at line 299 of file common.h.

bool piece_IsKnight ( pieceT  p)
inline

Definition at line 311 of file common.h.

bool piece_IsPawn ( pieceT  p)
inline

Definition at line 314 of file common.h.

bool piece_IsQueen ( pieceT  p)
inline

Definition at line 302 of file common.h.

bool piece_IsRook ( pieceT  p)
inline

Definition at line 305 of file common.h.

bool piece_IsSlider ( pieceT  p)
inline

Definition at line 317 of file common.h.

bool piece_IsWhite ( pieceT  p)
inline

Definition at line 293 of file common.h.

pieceT piece_Make ( colorT  c,
pieceT  p 
)
inline

Definition at line 290 of file common.h.

pieceT piece_Type ( pieceT  p)
inline

Definition at line 287 of file common.h.

int piece_Value ( pieceT  p)
inline

Definition at line 336 of file common.h.

rankT rank_FromChar ( char  c)
inline

Definition at line 364 of file common.h.

bool square_Adjacent ( squareT  from,
squareT  to 
)
inline

Definition at line 677 of file common.h.

colorT square_Color ( squareT  sq)
inline

Definition at line 405 of file common.h.

uint square_Distance ( squareT  from,
squareT  to 
)
inline

Definition at line 449 of file common.h.

int square_EdgeDistance ( squareT  sq)
inline

Definition at line 498 of file common.h.

squareT square_FlipDiag ( squareT  sq)
inline

Definition at line 429 of file common.h.

squareT square_FlipFyle ( squareT  sq)
inline

Definition at line 413 of file common.h.

squareT square_FlipRank ( squareT  sq)
inline

Definition at line 421 of file common.h.

fyleT square_Fyle ( squareT  sq)
inline

Definition at line 379 of file common.h.

char square_FyleChar ( squareT  sq)
inline

Definition at line 515 of file common.h.

bool square_IsCornerSquare ( squareT  sq)
inline

Definition at line 470 of file common.h.

bool square_IsEdgeSquare ( squareT  sq)
inline

Definition at line 476 of file common.h.

bool square_IsKnightHop ( squareT  from,
squareT  to 
)
inline

Definition at line 504 of file common.h.

leftDiagT square_LeftDiag ( squareT  sq)
inline

Definition at line 391 of file common.h.

squareT square_Make ( fyleT  f,
rankT  r 
)
inline

Definition at line 372 of file common.h.

squareT square_NearestCorner ( squareT  sq)
inline

Definition at line 460 of file common.h.

void square_Print ( squareT  sq,
char *  str 
)
inline

Definition at line 527 of file common.h.

rankT square_Rank ( squareT  sq)
inline

Definition at line 385 of file common.h.

char square_RankChar ( squareT  sq)
inline

Definition at line 521 of file common.h.

rightDiagT square_RightDiag ( squareT  sq)
inline

Definition at line 397 of file common.h.

Variable Documentation

const squareT A1 = 0

Definition at line 343 of file common.h.

const squareT A2 = 8

Definition at line 344 of file common.h.

const squareT A3 =16

Definition at line 345 of file common.h.

const squareT A4 =24

Definition at line 346 of file common.h.

const squareT A5 =32

Definition at line 347 of file common.h.

const squareT A6 =40

Definition at line 348 of file common.h.

const squareT A7 =48

Definition at line 349 of file common.h.

const squareT A8 =56

Definition at line 350 of file common.h.

const fyleT A_FYLE = 0

Definition at line 360 of file common.h.

const squareT B1 = 1

Definition at line 343 of file common.h.

const squareT B2 = 9

Definition at line 344 of file common.h.

const squareT B3 =17

Definition at line 345 of file common.h.

const squareT B4 =25

Definition at line 346 of file common.h.

const squareT B5 =33

Definition at line 347 of file common.h.

const squareT B6 =41

Definition at line 348 of file common.h.

const squareT B7 =49

Definition at line 349 of file common.h.

const squareT B8 =57

Definition at line 350 of file common.h.

const fyleT B_FYLE = 1

Definition at line 360 of file common.h.

const pieceT BB = 12

Definition at line 237 of file common.h.

const pieceT BISHOP = 4

Definition at line 224 of file common.h.

const pieceT BK = 9

Definition at line 237 of file common.h.

const colorT BLACK = 1

Definition at line 204 of file common.h.

const pieceT BM = 17

Definition at line 240 of file common.h.

const pieceT BN = 13

Definition at line 237 of file common.h.

const colorT BOARD_SQUARECOLOR[66]
Initial value:

Definition at line 650 of file common.h.

const pieceT BP = 14

Definition at line 237 of file common.h.

const pieceT BQ = 10

Definition at line 237 of file common.h.

const pieceT BR = 11

Definition at line 237 of file common.h.

const squareT C1 = 2

Definition at line 343 of file common.h.

const squareT C2 =10

Definition at line 344 of file common.h.

const squareT C3 =18

Definition at line 345 of file common.h.

const squareT C4 =26

Definition at line 346 of file common.h.

const squareT C5 =34

Definition at line 347 of file common.h.

const squareT C6 =42

Definition at line 348 of file common.h.

const squareT C7 =50

Definition at line 349 of file common.h.

const squareT C8 =58

Definition at line 350 of file common.h.

const fyleT C_FYLE = 2

Definition at line 360 of file common.h.

const char COLOR_CHAR[3] = {'W', 'B', '_' }

Definition at line 207 of file common.h.

const squareT COLOR_SQUARE = 64

Definition at line 351 of file common.h.

const squareT D1 = 3

Definition at line 343 of file common.h.

const squareT D2 =11

Definition at line 344 of file common.h.

const squareT D3 =19

Definition at line 345 of file common.h.

const squareT D4 =27

Definition at line 346 of file common.h.

const squareT D5 =35

Definition at line 347 of file common.h.

const squareT D6 =43

Definition at line 348 of file common.h.

const squareT D7 =51

Definition at line 349 of file common.h.

const squareT D8 =59

Definition at line 350 of file common.h.

const fyleT D_FYLE = 3

Definition at line 360 of file common.h.

const int dirDelta[11]
Initial value:
= {
0,
8,
-8,
0,
-1,
7,
-9,
0,
1,
9,
-7
}

Definition at line 604 of file common.h.

const bool dirIsDiagonal[11]
Initial value:
= {
false,
false,
false,
false,
false,
true,
true,
false,
false,
true,
true
}

Definition at line 580 of file common.h.

const directionT dirOpposite[11]
Initial value:
= {
DOWN,
UP,
LEFT,
}
const directionT UP
Definition: common.h:547
const directionT LEFT
Definition: common.h:549
const directionT UP_LEFT
Definition: common.h:551
const directionT RIGHT
Definition: common.h:550
const directionT UP_RIGHT
Definition: common.h:552
const directionT NULL_DIR
Definition: common.h:546
const directionT DOWN
Definition: common.h:548
const directionT DOWN_RIGHT
Definition: common.h:554
const directionT DOWN_LEFT
Definition: common.h:553

Definition at line 556 of file common.h.

const directionT DOWN = 2

Definition at line 548 of file common.h.

const directionT DOWN_LEFT = (DOWN | LEFT)

Definition at line 553 of file common.h.

const directionT DOWN_RIGHT = (DOWN | RIGHT)

Definition at line 554 of file common.h.

const squareT E1 = 4

Definition at line 343 of file common.h.

const squareT E2 =12

Definition at line 344 of file common.h.

const squareT E3 =20

Definition at line 345 of file common.h.

const squareT E4 =28

Definition at line 346 of file common.h.

const squareT E5 =36

Definition at line 347 of file common.h.

const squareT E6 =44

Definition at line 348 of file common.h.

const squareT E7 =52

Definition at line 349 of file common.h.

const squareT E8 =60

Definition at line 350 of file common.h.

const fyleT E_FYLE = 4

Definition at line 360 of file common.h.

const ecoT ECO_None = 0

Definition at line 164 of file common.h.

const int edgeDist[66]
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 0,
0, 1, 2, 2, 2, 2, 1, 0,
0, 1, 2, 3, 3, 2, 1, 0,
0, 1, 2, 3, 3, 2, 1, 0,
0, 1, 2, 2, 2, 2, 1, 0,
0, 1, 1, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0,
-1, -1
}

Definition at line 485 of file common.h.

const pieceT EMPTY = 7

Definition at line 234 of file common.h.

const pieceT END_OF_BOARD = 0

Definition at line 235 of file common.h.

const compareT EQUAL_TO = 0

Definition at line 107 of file common.h.

const squareT F1 = 5

Definition at line 343 of file common.h.

const squareT F2 =13

Definition at line 344 of file common.h.

const squareT F3 =21

Definition at line 345 of file common.h.

const squareT F4 =29

Definition at line 346 of file common.h.

const squareT F5 =37

Definition at line 347 of file common.h.

const squareT F6 =45

Definition at line 348 of file common.h.

const squareT F7 =53

Definition at line 349 of file common.h.

const squareT F8 =61

Definition at line 350 of file common.h.

const fyleT F_FYLE = 5

Definition at line 360 of file common.h.

const squareT G1 = 6

Definition at line 343 of file common.h.

const squareT G2 =14

Definition at line 344 of file common.h.

const squareT G3 =22

Definition at line 345 of file common.h.

const squareT G4 =30

Definition at line 346 of file common.h.

const squareT G5 =38

Definition at line 347 of file common.h.

const squareT G6 =46

Definition at line 348 of file common.h.

const squareT G7 =54

Definition at line 349 of file common.h.

const squareT G8 =62

Definition at line 350 of file common.h.

const fyleT G_FYLE = 6

Definition at line 361 of file common.h.

const compareT GREATER_THAN = 1

Definition at line 107 of file common.h.

const char GZIP_SUFFIX[] = ".gz"

Definition at line 55 of file common.h.

const squareT H1 = 7

Definition at line 343 of file common.h.

const squareT H2 =15

Definition at line 344 of file common.h.

const squareT H3 =23

Definition at line 345 of file common.h.

const squareT H4 =31

Definition at line 346 of file common.h.

const squareT H5 =39

Definition at line 347 of file common.h.

const squareT H6 =47

Definition at line 348 of file common.h.

const squareT H7 =55

Definition at line 349 of file common.h.

const squareT H8 =63

Definition at line 350 of file common.h.

const fyleT H_FYLE = 7

Definition at line 361 of file common.h.

const pieceT KING = 1

Definition at line 221 of file common.h.

const pieceT KNIGHT = 5

Definition at line 225 of file common.h.

const castleDirT KSIDE = 1

Definition at line 215 of file common.h.

const directionT LEFT = 4

Definition at line 549 of file common.h.

const compareT LESS_THAN = -1

Definition at line 107 of file common.h.

const uint MAX_PIECE_TYPES = 18

Definition at line 242 of file common.h.

const fyleT NO_FYLE = 64

Definition at line 361 of file common.h.

const rankT NO_RANK = 64

Definition at line 356 of file common.h.

const colorT NOCOLOR = 2

Definition at line 205 of file common.h.

const squareT NS = 65

Definition at line 352 of file common.h.

const directionT NULL_DIR = 0

Definition at line 546 of file common.h.

const squareT NULL_SQUARE = 65

Definition at line 352 of file common.h.

const uint NUM_COLOR_TYPES = 2

Definition at line 201 of file common.h.

const uint NUM_RESULT_TYPES = 4

Definition at line 182 of file common.h.

const pieceT PAWN = 6

Definition at line 226 of file common.h.

const char PGN_SUFFIX[] = ".pgn"

Definition at line 57 of file common.h.

const char PIECE_CHAR[] = "xKQRBNP.xkqrbnpxMm"

Definition at line 247 of file common.h.

const pieceT PIECE_FLIP[MAX_PIECE_TYPES]
Initial value:
= {
BK, BQ, BR, BB, BN, BP,
WK, WQ, WR, WB, WN, WP,
}
const pieceT WK
Definition: common.h:236
const pieceT BB
Definition: common.h:237
const pieceT BK
Definition: common.h:237
const pieceT BN
Definition: common.h:237
const pieceT BQ
Definition: common.h:237
const pieceT WQ
Definition: common.h:236
const pieceT BP
Definition: common.h:237
const pieceT EMPTY
Definition: common.h:234
const pieceT WB
Definition: common.h:236
const pieceT WM
Definition: common.h:240
const pieceT WP
Definition: common.h:236
const pieceT END_OF_BOARD
Definition: common.h:235
const pieceT BR
Definition: common.h:237
const pieceT WN
Definition: common.h:236
const pieceT BM
Definition: common.h:240
const pieceT WR
Definition: common.h:236

Definition at line 251 of file common.h.

const bool PIECE_IS_SLIDER[8]
Initial value:
= {
false,
false, true, true, true, false, false,
false,
}

Definition at line 259 of file common.h.

const int PIECE_VALUE[MAX_PIECE_TYPES]
Initial value:
= {
0,
100, 9, 5, 3, 3, 1,
0, 0,
-100, -9, -5, -3, -3, -1,
0, 3, -3
}

Definition at line 267 of file common.h.

const castleDirT QSIDE = 0

Definition at line 215 of file common.h.

const pieceT QUEEN = 2

Definition at line 222 of file common.h.

const rankT RANK_1 = 0

Definition at line 355 of file common.h.

const rankT RANK_2 = 1

Definition at line 355 of file common.h.

const rankT RANK_3 = 2

Definition at line 355 of file common.h.

const rankT RANK_4 = 3

Definition at line 355 of file common.h.

const rankT RANK_5 = 4

Definition at line 355 of file common.h.

const rankT RANK_6 = 5

Definition at line 355 of file common.h.

const rankT RANK_7 = 6

Definition at line 356 of file common.h.

const rankT RANK_8 = 7

Definition at line 356 of file common.h.

const uint rankFyleDist[64]
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7,
1, 0, 1, 2, 3, 4, 5, 6,
2, 1, 0, 1, 2, 3, 4, 5,
3, 2, 1, 0, 1, 2, 3, 4,
4, 3, 2, 1, 0, 1, 2, 3,
5, 4, 3, 2, 1, 0, 1, 2,
6, 5, 4, 3, 2, 1, 0, 1,
7, 6, 5, 4, 3, 2, 1, 0
}

Definition at line 435 of file common.h.

const byte RATING_BCF = 6

Definition at line 174 of file common.h.

const byte RATING_DWZ = 5

Definition at line 173 of file common.h.

const byte RATING_Elo = 0

Definition at line 168 of file common.h.

const byte RATING_ICCF = 3

Definition at line 171 of file common.h.

const byte RATING_Rapid = 2

Definition at line 170 of file common.h.

const byte RATING_Rating = 1

Definition at line 169 of file common.h.

const byte RATING_USCF = 4

Definition at line 172 of file common.h.

const char* ratingTypeNames[17]

Definition at line 116 of file game.cpp.

const resultT RESULT_Black = 2

Definition at line 187 of file common.h.

const char RESULT_CHAR[4] = { '*', '1', '0', '=' }

Definition at line 191 of file common.h.

const resultT RESULT_Draw = 3

Definition at line 188 of file common.h.

const char RESULT_LONGSTR[4][8] = { "*", "1-0", "0-1", "1/2-1/2" }

Definition at line 193 of file common.h.

const resultT RESULT_None = 0

Definition at line 185 of file common.h.

const resultT RESULT_OPPOSITE[4]
Initial value:
= {
}
const resultT RESULT_Black
Definition: common.h:187
const resultT RESULT_Draw
Definition: common.h:188
const resultT RESULT_White
Definition: common.h:186
const resultT RESULT_None
Definition: common.h:185

Definition at line 194 of file common.h.

const uint RESULT_SCORE[4] = { 1, 2, 0, 1 }

Definition at line 190 of file common.h.

const char RESULT_STR[4][4] = { "*", "1-0", "0-1", "=-=" }

Definition at line 192 of file common.h.

const resultT RESULT_White = 1

Definition at line 186 of file common.h.

const directionT RIGHT = 8

Definition at line 550 of file common.h.

const pieceT ROOK = 3

Definition at line 223 of file common.h.

const versionT SCID_OLDEST_VERSION = 300

Definition at line 50 of file common.h.

const versionT SCID_VERSION = 400

Definition at line 49 of file common.h.

const char SCID_VERSION_STRING[] = "4.6.5"

Definition at line 52 of file common.h.

const char SCID_WEBSITE[] = "http://scid.sourceforge.net/"

Definition at line 53 of file common.h.

directionT sqDir[66][66]

Definition at line 24 of file misc.cpp.

const boardT START_BOARD
Initial value:
=
{
WR, WN, WB, WQ, WK, WB, WN, WR,
WP, WP, WP, WP, WP, WP, WP, WP,
BP, BP, BP, BP, BP, BP, BP, BP,
BR, BN, BB, BQ, BK, BB, BN, BR,
}
const pieceT WK
Definition: common.h:236
const pieceT BB
Definition: common.h:237
const pieceT BK
Definition: common.h:237
const pieceT BN
Definition: common.h:237
const pieceT BQ
Definition: common.h:237
const pieceT WQ
Definition: common.h:236
const pieceT BP
Definition: common.h:237
const pieceT EMPTY
Definition: common.h:234
const pieceT WB
Definition: common.h:236
const pieceT WP
Definition: common.h:236
const pieceT END_OF_BOARD
Definition: common.h:235
const pieceT BR
Definition: common.h:237
const pieceT WN
Definition: common.h:236
const pieceT WR
Definition: common.h:236

Definition at line 632 of file common.h.

const directionT UP = 1

Definition at line 547 of file common.h.

const directionT UP_LEFT = (UP | LEFT)

Definition at line 551 of file common.h.

const directionT UP_RIGHT = (UP | RIGHT)

Definition at line 552 of file common.h.

const pieceT WB = 4

Definition at line 236 of file common.h.

const colorT WHITE = 0

Definition at line 203 of file common.h.

const pieceT WK = 1

Definition at line 236 of file common.h.

const pieceT WM = 16

Definition at line 240 of file common.h.

const pieceT WN = 5

Definition at line 236 of file common.h.

const pieceT WP = 6

Definition at line 236 of file common.h.

const pieceT WQ = 2

Definition at line 236 of file common.h.

const pieceT WR = 3

Definition at line 236 of file common.h.

const char ZIP_SUFFIX[] = ".zip"

Definition at line 56 of file common.h.