]> Skullheadx's Git Forge - monopoly-web.git/commitdiff
Tax
authorSkullheadx <admonty1@protonmail.com>
Sun, 17 May 2026 06:49:16 +0000 (02:49 -0400)
committerSkullheadx <admonty1@protonmail.com>
Sun, 17 May 2026 06:49:16 +0000 (02:49 -0400)
game/game.go
game/tax.go [new file with mode: 0644]

index a40b22396aa2b7efacc99e7f61a89cef8869a224..b3b35fba71a07f45ed229d2364fecd98efa7ead1 100644 (file)
@@ -63,7 +63,7 @@ func RollDice() {
                ProcessMovement()
 
                ProcessGo()
-               // ProcessTax()
+               ProcessTax()
 
                ProcessOwnedColors()
                ProcessOwnedUtility()
diff --git a/game/tax.go b/game/tax.go
new file mode 100644 (file)
index 0000000..3c5213a
--- /dev/null
@@ -0,0 +1,8 @@
+package game
+
+func ProcessTax() {
+       for _, playerID := range TaxVisitors {
+               taxID := SpaceToTaxSpace[Users[playerID].CurrentSpaceID]
+               AdjustPlayerMoney(playerID, -TaxSpaces[taxID].Amount)
+       }
+}