Compare commits
No commits in common. "master" and "struct" have entirely different histories.
3
Board.h
3
Board.h
|
|
@ -148,7 +148,7 @@ void make(Move m) {
|
||||||
int sq_diff_abs = abs(sq_diff);
|
int sq_diff_abs = abs(sq_diff);
|
||||||
|
|
||||||
|
|
||||||
// TODO test the castling code more extensively
|
// TODO test the csatling code
|
||||||
// Handle castling
|
// Handle castling
|
||||||
if(piece_type == W_KING && sq_diff_abs == 2) {
|
if(piece_type == W_KING && sq_diff_abs == 2) {
|
||||||
// We are castling! After all, a king cannot move
|
// We are castling! After all, a king cannot move
|
||||||
|
|
@ -172,6 +172,7 @@ void make(Move m) {
|
||||||
u.sq_from |= 0x08;
|
u.sq_from |= 0x08;
|
||||||
// We are doing the simple way:
|
// We are doing the simple way:
|
||||||
// unset it any time a move is made from the original position.
|
// unset it any time a move is made from the original position.
|
||||||
|
// TODO handle castle rights and unmake
|
||||||
if(m.sq_from == 0x00) // white queenside rook
|
if(m.sq_from == 0x00) // white queenside rook
|
||||||
field[PTR_SIDE_AND_CASTLERIGHT] &= ~0b00010;
|
field[PTR_SIDE_AND_CASTLERIGHT] &= ~0b00010;
|
||||||
else if(m.sq_from == 0x07) // white kingside rook
|
else if(m.sq_from == 0x07) // white kingside rook
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ Move Movegen::generate_non_sliding(byte piece_type) {
|
||||||
|
|
||||||
Move Movegen::generate_pawn() {
|
Move Movegen::generate_pawn() {
|
||||||
// TODO: implement capture promotion
|
// TODO: implement capture promotion
|
||||||
|
|
||||||
byte color = black_moving();
|
byte color = black_moving();
|
||||||
byte offset;
|
byte offset;
|
||||||
byte target;
|
byte target;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue