64 , :
byte [64] Squares;
, , .
, , . , , ? , .
, 8 . , 63, 8, 7.875, 7. 3, 8, 0,375, 0. # , :
Row = (int)(position / 8)
, , 8. , 24 - 0. 15 8 7,
Column = position % 8
Armed with these two concepts, we can transform any position on our 64-square board into a column and a row.
If you want to know more about creating your own chess engine, see http://www.chessbin.com
source
share