diff -r fd1eb081de40 -r 2e5846019b4f src/chess/bishop.c --- a/src/chess/bishop.c Mon Mar 31 11:41:08 2014 +0200 +++ b/src/chess/bishop.c Mon Mar 31 14:00:58 2014 +0200 @@ -42,13 +42,13 @@ uint8_t y = move->fromrow; uint8_t x = move->fromfile; - do { + while (x != move->tofile-dx && y != move->torow-dy) { x += dx; y += dy; if (board[y][x]) { return 1; } - } while (x != move->tofile && y != move->torow); + } return 0; }