From e4355757fb94e43944c5d57c94e29321737e4744 Mon Sep 17 00:00:00 2001 From: mehbark Date: Sun, 4 May 2025 15:29:29 -0400 Subject: [PATCH] require balls to be stationary on goals --- levels.txt | 2 +- main.gd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/levels.txt b/levels.txt index 9072620..0885f0c 100644 --- a/levels.txt +++ b/levels.txt @@ -46,5 +46,5 @@ ; 4 pool ############# -# @ o o_ . # +# @ o. o_ . # ############# diff --git a/main.gd b/main.gd index d523100..94c37e4 100644 --- a/main.gd +++ b/main.gd @@ -124,8 +124,8 @@ func step(move: Vector2i): func won() -> bool: for piece in board.pieces(): if piece.type == Piece.Type.Goal: - var covered := board.any_at(piece.lpos, func(p): return p.type == Piece.Type.Ball) - if !covered: + var ball := board.type_at(piece.lpos, Piece.Type.Ball) + if !ball or ball.lvel != Vector2i.ZERO: return false return true