diff --git a/Board.h b/Board.h index ec5b816..71a5804 100644 --- a/Board.h +++ b/Board.h @@ -149,7 +149,8 @@ void Board::make(Move m) { // handle enpassant capture if( - field[PTR_ENPASSANT] && piece_type == W_PAWN && + field[PTR_ENPASSANT] && + piece_type == W_PAWN && (m.sq_to & 0x7) == (field[PTR_ENPASSANT] & 0x7) && (m.sq_to & 0x70) == (0x50 - 0x30*black_moving()) ) { @@ -165,7 +166,7 @@ void Board::make(Move m) { // handle enpassant setup (double pawn move) if( piece_type == W_PAWN && - (sq_diff == 32 || sq_diff == -32) + (sq_diff_abs == 32) ) { // we are doing a pawn double-move. // therefore, it allows enpassant in the next move. diff --git a/Panic.h b/Panic.h index 64b457b..664e1b9 100644 --- a/Panic.h +++ b/Panic.h @@ -1,3 +1,6 @@ +#ifndef __PANIC_H_INC +#define __PANIC_H_INC + void panic(const __FlashStringHelper* message) { while(true) { Serial.println(F("PANIC!")); @@ -5,3 +8,5 @@ void panic(const __FlashStringHelper* message) { delay(1000); } } + +#endif