From 870b84563095b5e254f5438dbe689690c3802674 Mon Sep 17 00:00:00 2001 From: fdai2751 Date: Wed, 31 Jan 2024 20:22:18 +0100 Subject: [PATCH] refactoring: fixed uninitialised player direction --- src/main/java/pacmanGame/Player.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/pacmanGame/Player.java b/src/main/java/pacmanGame/Player.java index 9d10ae5..c8c2e48 100644 --- a/src/main/java/pacmanGame/Player.java +++ b/src/main/java/pacmanGame/Player.java @@ -8,6 +8,7 @@ public class Player { public Player(GameManager gameManager) { this.gameManager = gameManager; this.position = new Vector2(-1,-1); + this.direction = new Vector2(0,-1); } public void Move() {