smol fixes
This commit is contained in:
parent
3702bddfd3
commit
cc20fa0ce5
5
Board.h
5
Board.h
|
|
@ -149,7 +149,8 @@ void Board::make(Move m) {
|
||||||
|
|
||||||
// handle enpassant capture
|
// handle enpassant capture
|
||||||
if(
|
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 & 0x7) == (field[PTR_ENPASSANT] & 0x7) &&
|
||||||
(m.sq_to & 0x70) == (0x50 - 0x30*black_moving())
|
(m.sq_to & 0x70) == (0x50 - 0x30*black_moving())
|
||||||
) {
|
) {
|
||||||
|
|
@ -165,7 +166,7 @@ void Board::make(Move m) {
|
||||||
// handle enpassant setup (double pawn move)
|
// handle enpassant setup (double pawn move)
|
||||||
if(
|
if(
|
||||||
piece_type == W_PAWN &&
|
piece_type == W_PAWN &&
|
||||||
(sq_diff == 32 || sq_diff == -32)
|
(sq_diff_abs == 32)
|
||||||
) {
|
) {
|
||||||
// we are doing a pawn double-move.
|
// we are doing a pawn double-move.
|
||||||
// therefore, it allows enpassant in the next move.
|
// therefore, it allows enpassant in the next move.
|
||||||
|
|
|
||||||
5
Panic.h
5
Panic.h
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef __PANIC_H_INC
|
||||||
|
#define __PANIC_H_INC
|
||||||
|
|
||||||
void panic(const __FlashStringHelper* message) {
|
void panic(const __FlashStringHelper* message) {
|
||||||
while(true) {
|
while(true) {
|
||||||
Serial.println(F("PANIC!"));
|
Serial.println(F("PANIC!"));
|
||||||
|
|
@ -5,3 +8,5 @@ void panic(const __FlashStringHelper* message) {
|
||||||
delay(1000);
|
delay(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue