This commit is contained in:
kyodesle 2026-08-28 11:24:17 -07:00
parent 73aa9f8854
commit ec2a384482
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ func (b *Board) inBounds(r, c int) bool {
func (b *Board) isSquareAttacked(pos Position, byColor int) bool { func (b *Board) isSquareAttacked(pos Position, byColor int) bool {
r, c := pos.Row, pos.Col r, c := pos.Row, pos.Col
pawnDir := 1 pawnDir := -1
if byColor == Black { if byColor == Black {
pawnDir = 1 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 { func (b *Board) pawnMoves(from Position, color int) []Move {
var moves []Move var moves []Move
r, c := from.Row, from.Col r, c := from.Row, from.Col
dir := 1 dir := -1
if color == Black { if color == Black {
dir = 1 dir = 1
} }

BIN
chess Executable file

Binary file not shown.