Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions SnakeGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@
* @version 1
*/
class SnakeGame implements Game {
public String getName() { return "Snake"; }
public String getName() {
return "Snake";
}
public Optional<Integer> play() {
System.out.println("[Playing Snake - Placeholder]");
return Optional.empty();
/**
*Added print statements that give user
*a descripton of how to play SnakeGame.java
*@return Placeholder
*/
Comment on lines +19 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be more of a "Commit message" than a source code comment. Please delete.

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();
}
}