Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions | Variables
position.cpp File Reference
#include "common.h"
#include "position.h"
#include "attacks.h"
#include "misc.h"
#include "hash.h"
#include "sqmove.h"
#include "dstring.h"
#include "movegen.h"
#include <algorithm>
Include dependency graph for position.cpp:

Go to the source code of this file.

Classes

struct  sqDir_Init
 
struct  htmlStyleT
 

Macros

#define HASH(h, p, sq)   (h) ^= hashVal[(p)][(sq)]
 
#define UNHASH(h, p, sq)   (h) ^= hashVal[(p)][(sq)]
 
#define POSSIBLE_CAPTURE(d)
 

Functions

squareT randomSquare (void)
 
squareT randomPawnSquare (void)
 

Variables

directionT sqDir [66][66]
 
struct sqDir_Init sqDir_Init_singleton
 

Macro Definition Documentation

◆ HASH

#define HASH (   h,
  p,
  sq 
)    (h) ^= hashVal[(p)][(sq)]

Definition at line 30 of file position.cpp.

◆ POSSIBLE_CAPTURE

#define POSSIBLE_CAPTURE (   d)
Value:
((d != NULL_SQUARE) \
&& ((piece_Color (Board[d]) == (color_Flip(ToMove))) \
|| (d == EPTarget && IsValidEnPassant(from,d))))
const squareT NULL_SQUARE
Definition: common.h:357
colorT color_Flip(colorT c)
Definition: common.h:214
colorT piece_Color(pieceT p)
Definition: common.h:285

◆ UNHASH

#define UNHASH (   h,
  p,
  sq 
)    (h) ^= hashVal[(p)][(sq)]

Definition at line 31 of file position.cpp.

Function Documentation

◆ randomPawnSquare()

squareT randomPawnSquare ( void  )
inline

Definition at line 3022 of file position.cpp.

◆ randomSquare()

squareT randomSquare ( void  )
inline

Definition at line 3019 of file position.cpp.

Variable Documentation

◆ sqDir

directionT sqDir[66][66]

Definition at line 130 of file position.cpp.

◆ sqDir_Init_singleton

struct sqDir_Init sqDir_Init_singleton