From 4d6abce3dfed9b394aef461ec821b0a82aa44938 Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Thu, 8 Feb 2024 00:41:10 +0100 Subject: [PATCH 1/5] added BETTER ascii pacman --- .../pacmanGame/VisualizerPlainTextUltra.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/pacmanGame/VisualizerPlainTextUltra.java b/src/main/java/pacmanGame/VisualizerPlainTextUltra.java index 5ad17d4..fecb2cf 100644 --- a/src/main/java/pacmanGame/VisualizerPlainTextUltra.java +++ b/src/main/java/pacmanGame/VisualizerPlainTextUltra.java @@ -75,26 +75,26 @@ public class VisualizerPlainTextUltra implements Visualizer { }; public final String[] playerSprite = { - "▄██▄", - "▀██▀" + "o88o", + "°88°" }; public final String[][] playerAltSprites = { { - "▄ ▄", - "▀██▀" + "o o", + "°88°" }, { - "▄██▄", - "▀ ▀" + "o88o", + "° °" }, { - " ▀█▄", - " ▄█▀" + " °8o", + " o8°" }, { - "▄█▀ ", - "▀█▄ " + "o8° ", + "°8o " } }; From d1a55995a24da795f642cebbf74501c891f8d5ef Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Thu, 8 Feb 2024 00:44:30 +0100 Subject: [PATCH 2/5] added displaying lives to vptu --- src/main/java/pacmanGame/VisualizerPlainTextUltra.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/pacmanGame/VisualizerPlainTextUltra.java b/src/main/java/pacmanGame/VisualizerPlainTextUltra.java index fecb2cf..8ff0fae 100644 --- a/src/main/java/pacmanGame/VisualizerPlainTextUltra.java +++ b/src/main/java/pacmanGame/VisualizerPlainTextUltra.java @@ -112,7 +112,7 @@ public class VisualizerPlainTextUltra implements Visualizer { output = ""; if(showScore) { - output = "\nSCORE: " + gameManager.score + "\n\n"; + output = "\nSCORE: " + gameManager.score + " LIVES: " + gameManager.livesRemaining + "\n\n"; } int lineBufferSize = 2; From bce8de767fd69ea192e1e88749c0da619412ec05 Mon Sep 17 00:00:00 2001 From: fdai7753 Date: Thu, 8 Feb 2024 01:16:00 +0100 Subject: [PATCH 3/5] Added unfinished wall doesn't obstruct ghost movement test --- src/test/java/pacmanTests/GhostTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/pacmanTests/GhostTest.java b/src/test/java/pacmanTests/GhostTest.java index 99e515c..399239a 100644 --- a/src/test/java/pacmanTests/GhostTest.java +++ b/src/test/java/pacmanTests/GhostTest.java @@ -52,6 +52,11 @@ class GhostTest { // assert //assertThat(position).isEqualTo(expectedPosition); } + @Test + void Ghosts_wall_doesntobstructMovement() { + + } + } \ No newline at end of file From dedcf295cc0f3291d27643be2592b5f6cc1a9176 Mon Sep 17 00:00:00 2001 From: fdai7753 Date: Thu, 8 Feb 2024 01:19:03 +0100 Subject: [PATCH 4/5] Finished wall doesn't obstruct ghost movement test, but commented out because of unimplemented code --- src/test/java/pacmanTests/GhostTest.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/test/java/pacmanTests/GhostTest.java b/src/test/java/pacmanTests/GhostTest.java index 399239a..319b083 100644 --- a/src/test/java/pacmanTests/GhostTest.java +++ b/src/test/java/pacmanTests/GhostTest.java @@ -54,9 +54,16 @@ class GhostTest { } @Test void Ghosts_wall_doesntobstructMovement() { - + // arrange + //GameManager gameManager = new GameManager(); + //Ghost ghost = gameManager.ghosts[0]; + //ghost.position = new Vector2(2,2); + //Vector2 direction = new Vector2(-1,0); + //Vector2 expectedPosition = new Vector2(1,2); + // act + //ghost.move(direction); + //Vector2 position = ghost.position; + // assert + //assertThat(position).isEqualTo(expectedPosition); } - - - } \ No newline at end of file From 34b761e77a5c980a18462e2ed78fa54be47e002a Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Thu, 8 Feb 2024 01:26:06 +0100 Subject: [PATCH 5/5] added even better ascii pacman --- .../pacmanGame/VisualizerPlainTextUltra.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/pacmanGame/VisualizerPlainTextUltra.java b/src/main/java/pacmanGame/VisualizerPlainTextUltra.java index 8ff0fae..7c3e7df 100644 --- a/src/main/java/pacmanGame/VisualizerPlainTextUltra.java +++ b/src/main/java/pacmanGame/VisualizerPlainTextUltra.java @@ -38,7 +38,7 @@ public class VisualizerPlainTextUltra implements Visualizer { "~~~~" }, { - "/°°\\", + "/**\\", "~~~~" }, { @@ -76,25 +76,25 @@ public class VisualizerPlainTextUltra implements Visualizer { public final String[] playerSprite = { "o88o", - "°88°" + "*88*" }; public final String[][] playerAltSprites = { { "o o", - "°88°" + "*88*" }, { "o88o", - "° °" + "* *" }, { - " °8o", - " o8°" + " *8o", + " o8*" }, { - "o8° ", - "°8o " + "o8* ", + "*8o " } };