From 0bfb03f76781403814b989cf19457c4b4dcb9e59 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Sat, 30 Sep 2023 15:21:59 -0700 Subject: [PATCH] Fix legal move calculation --- game.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/game.go b/game.go index e0b3008..e4d12ee 100644 --- a/game.go +++ b/game.go @@ -417,14 +417,12 @@ func (g *Game) LegalMoves() [][]int { } // Move normally. - dir := -1 lastSpace := 1 if g.Turn == 2 { - dir = 1 lastSpace = 24 } - g.iterateSpaces(space+dir, lastSpace, func(to int, spaceCount int) { + g.iterateSpaces(space, lastSpace, func(to int, spaceCount int) { available := haveDiceRoll(space, to) if available == 0 { return