From 18caa47b492d0ad8668468eff9bef24fba8c1f75 Mon Sep 17 00:00:00 2001 From: fdai2751 Date: Thu, 8 Feb 2024 20:17:10 +0100 Subject: [PATCH] added the collision between Gohst and player, discrement the playerlives --- src/main/java/pacmanGame/GameManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/pacmanGame/GameManager.java b/src/main/java/pacmanGame/GameManager.java index 96a0953..9e527b9 100644 --- a/src/main/java/pacmanGame/GameManager.java +++ b/src/main/java/pacmanGame/GameManager.java @@ -57,6 +57,9 @@ public class GameManager { if(!isPaused) { if(time%moveSpeed == 0) { player.Move(); + if(ghostPlayerColisionTest()) { + livesRemaining--; + } for(int i = 0; i