From cd750a55083f056ccc06b67d7193288c9ec2b291 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 24 Sep 2025 18:01:55 +0200 Subject: [PATCH] fix: reset state on Enter() --- game/state/handlers/gameplay.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game/state/handlers/gameplay.go b/game/state/handlers/gameplay.go index 7eec00e..0027b0a 100644 --- a/game/state/handlers/gameplay.go +++ b/game/state/handlers/gameplay.go @@ -44,6 +44,9 @@ func NewGamePlay() *GamePlay { } func (gp *GamePlay) Enter() { + gp.grid = game.Grid{} + gp.score = 0 + gp.dropTimer.SetInterval(0.3) gp.shapeQueue = game.NewShapeQueue() gp.nextShape = gp.shapeQueue.Next() gp.SpawnShape()