From e741703c9030ffd1f96a5d55f02d89991852c48a Mon Sep 17 00:00:00 2001 From: Skullheadx Date: Sat, 16 May 2026 19:32:19 -0400 Subject: [PATCH] passed or land on Go --- game/go.go | 7 +++++++ game/movement.go | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 game/go.go diff --git a/game/go.go b/game/go.go new file mode 100644 index 0000000..cc1ae84 --- /dev/null +++ b/game/go.go @@ -0,0 +1,7 @@ +package game + +func ProcessGo() { + for _, playerID := range GoVisitors { + Users[playerID].Money += 200 + } +} diff --git a/game/movement.go b/game/movement.go index d36ad06..92d6897 100644 --- a/game/movement.go +++ b/game/movement.go @@ -59,7 +59,11 @@ var ( ) func AdvancePlayer(playerID int32, currentPosition int32, diceRoll int32) { - nextPos := (currentPosition + diceRoll) % BoardSpaces + nextPos := (currentPosition + diceRoll) + if nextPos > BoardSpaces-1 { // Passed Go, but did not land on Go + GoVisitors = append(GoVisitors, playerID) + } + nextPos %= BoardSpaces propType := BoardSpaceTypes[nextPos] -- 2.54.0