User Tools

Site Tools


chess:programming:polyglot_book_format:castle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
chess:programming:polyglot_book_format:castle [2022/01/11 13:47] – created peterchess:programming:polyglot_book_format:castle [2022/01/11 13:54] (current) peter
Line 1: Line 1:
 ====== Chess - Programming - Polyglot Book Format - Castle ====== ====== Chess - Programming - Polyglot Book Format - Castle ======
  
 +**Castle** is part of the [[Chess:Programming:Polyglot Book Format:Key|Key]]
  
- +It is the exclusive or of entries from the **RANDOM_CASTLE** sub-array.
----- +
- +
-**castle** is the exclusive or of entries from the **RANDOM_CASTLE** sub-array.+
  
 The offsets are computed as: The offsets are computed as:
  
-|White can castle short|0| +^Color^Castle Side^Offset^ 
-|white can castle long|1| +|White|King-side Castle|0| 
-|black can castle short|2| +|White|Queen-side Castle|1| 
-|black can castle long|3| +|Black|King-side Castle|2| 
- +|Black|Queen-side Castle|3|
-If none of these flags apply then castle=0.+
  
 <WRAP info> <WRAP info>
 **NOTE:**  These flags are all true in the starting position and are only updated **after** the appropriate King, Rook or Castling moves. **NOTE:**  These flags are all true in the starting position and are only updated **after** the appropriate King, Rook or Castling moves.
 +
 +  * The default value for this field should be 0 if if none of these flags apply; i.e. then castle=0.
 +
 </WRAP> </WRAP>
- + 
 + 
 +<WRAP important> 
 +**WARNING:** Even though the flag may indicate that castleling can be done, a program should verify that a Castle-move is actually valid, as some mistakes may creep in. 
 +</WRAP> 
 + 
 + 
chess/programming/polyglot_book_format/castle.1641908837.txt.gz · Last modified: 2022/01/11 13:47 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki