From 661c922fd1ad1ca618a64e6f2d5279ce487f8247 Mon Sep 17 00:00:00 2001 From: Spencer-Church Date: Tue, 15 Apr 2025 15:31:16 +0000 Subject: [PATCH 1/3] Added a startup description for SnakeGame.java --- SnakeGame.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SnakeGame.java b/SnakeGame.java index 977c57a..0b2836f 100644 --- a/SnakeGame.java +++ b/SnakeGame.java @@ -14,7 +14,11 @@ class SnakeGame implements Game { public String getName() { return "Snake"; } public Optional play() { - System.out.println("[Playing Snake - Placeholder]"); + System.out.println("This is a simple console version of the Snake game."); + System.out.println("The player controls a snake that moves around a grid,"); + System.out.println("collecting food and growing in length."); + System.out.println("The game ends if the snake runs into itself"); + System.out.println("or the edge of the grid"); return Optional.empty(); } } From 544501596706c6896e7f0f64008a98819c744eb6 Mon Sep 17 00:00:00 2001 From: Spencer-Church Date: Tue, 22 Apr 2025 14:59:37 +0000 Subject: [PATCH 2/3] Fixed Checkstyle issues in SnakeGame.java --- SnakeGame.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/SnakeGame.java b/SnakeGame.java index 0b2836f..a77e0bd 100644 --- a/SnakeGame.java +++ b/SnakeGame.java @@ -12,13 +12,17 @@ * @version 1 */ class SnakeGame implements Game { - public String getName() { return "Snake"; } + public String getName() + { return "Snake"; +} public Optional play() { - System.out.println("This is a simple console version of the Snake game."); - System.out.println("The player controls a snake that moves around a grid,"); - System.out.println("collecting food and growing in length."); - System.out.println("The game ends if the snake runs into itself"); - System.out.println("or the edge of the grid"); - return Optional.empty(); + System.out.println("This is a simple console"+ + " version of the Snake game."); + System.out.println("The player controls a snake"+ + " that moves around a grid,"); + System.out.println("collecting food and growing in length."); + System.out.println("The game ends if the snake runs into itself"); + System.out.println("or the edge of the grid"); + return Optional.empty(); } } From 9d14358e3dce8e906d0284b7c852f197d474184d Mon Sep 17 00:00:00 2001 From: Spencer-Church Date: Tue, 6 May 2025 15:21:10 +0000 Subject: [PATCH 3/3] Made checkstyle changes to SnakeGame.java --- SnakeGame.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SnakeGame.java b/SnakeGame.java index a77e0bd..6a7e08a 100644 --- a/SnakeGame.java +++ b/SnakeGame.java @@ -12,14 +12,19 @@ * @version 1 */ class SnakeGame implements Game { - public String getName() - { return "Snake"; + public String getName() { + return "Snake"; } public Optional play() { - System.out.println("This is a simple console"+ - " version of the Snake game."); - System.out.println("The player controls a snake"+ - " that moves around a grid,"); +/** +*Added print statements that give user +*a descripton of how to play SnakeGame.java +*@return Placeholder +*/ + System.out.println("This is a simple console" + + " version of the Snake game."); + System.out.println("The player controls a snake" + + " that moves around a grid,"); System.out.println("collecting food and growing in length."); System.out.println("The game ends if the snake runs into itself"); System.out.println("or the edge of the grid");