diff --git a/board.go b/board.go index 154b51b..25ce899 100644 --- a/board.go +++ b/board.go @@ -69,7 +69,7 @@ func (b *Board) inBounds(r, c int) bool { func (b *Board) isSquareAttacked(pos Position, byColor int) bool { r, c := pos.Row, pos.Col - pawnDir := 1 + pawnDir := -1 if byColor == Black { pawnDir = 1 } @@ -197,7 +197,7 @@ var diagDirs = [][2]int{{-1, -1}, {-1, 1}, {1, -1}, {1, 1}} func (b *Board) pawnMoves(from Position, color int) []Move { var moves []Move r, c := from.Row, from.Col - dir := 1 + dir := -1 if color == Black { dir = 1 } diff --git a/chess b/chess new file mode 100755 index 0000000..bf8073b Binary files /dev/null and b/chess differ