]> Skullheadx's Git Forge - monopoly-web.git/commitdiff
fix event stack bug
authorSkullheadx <admonty1@protonmail.com>
Mon, 8 Jun 2026 21:47:31 +0000 (17:47 -0400)
committerSkullheadx <admonty1@protonmail.com>
Mon, 8 Jun 2026 21:47:31 +0000 (17:47 -0400)
game/types.go

index ae30651cf846a11c787f3837e27c2f16dfaf472e..1e589dd9d48776a20e13474481cb31a62c431836 100644 (file)
@@ -21,7 +21,7 @@ func (ctx *Context) EventPeek() EventType {
 
 func (ctx *Context) EventPop() EventType {
        last := ctx.Turn.EventStack[len(ctx.Turn.EventStack)-1]
-       ctx.Turn.EventStack = ctx.Turn.EventStack[:len(ctx.Turn.EventStack)]
+       ctx.Turn.EventStack = ctx.Turn.EventStack[:len(ctx.Turn.EventStack)-1]
        return last
 }
 
@@ -170,7 +170,6 @@ type Properties struct {
 
 type Context struct {
        Random     *rand.Rand
-       MoveQueue  []int32
        Players    Players
        Turn       Turn // state reset every turn end
        Visitors   Visitors