diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..c995aa5c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.debug.settings.onBuildFailureProceed": true +} \ No newline at end of file diff --git a/Candyland Map.pdf b/Candyland Map.pdf new file mode 100644 index 00000000..9bbcf22c Binary files /dev/null and b/Candyland Map.pdf differ diff --git a/Castle.java b/Castle.java new file mode 100644 index 00000000..bf682b71 --- /dev/null +++ b/Castle.java @@ -0,0 +1,81 @@ +/** + * Castle class represents a special location (castle) in the Candy Land game. + * Players can enter or exit castles if they are accessible. + */ +public class Castle { + protected static String name; + protected static boolean isAccessible; + protected static boolean isInTheCastle; + + /** + * Constructor for Castle. + * @param name The name of the castle. + */ + public Castle(String name) { + this.name = name; + this.isAccessible = true; + this.isInTheCastle = false; + } + + /** + * Gets the name of the castle. + * @return The name of the castle. + */ + public String getName() { + return name; + } + + /** + * Checks if the castle is accessible. + * @return True if accessible, false otherwise. + */ + public static boolean isAccessible() { + return isAccessible; + } + + /** + * Sets whether the castle is accessible. + * @param accessible True to make accessible, false to block access. + */ + public static void setAccessible(Boolean accessible) { + FrostedPalace.isAccessible = accessible; + } + + /** + * Checks if the player is currently inside the castle. + * @return True if inside, false otherwise. + */ + public boolean isInTheCastle() { + return isInTheCastle; + } + + + /** + * Handles the logic for entering the castle. + * Player can only enter if the castle is accessible and they are not already inside. + */ + public static void enter() { + if (isAccessible && !isInTheCastle) { + isInTheCastle = true; + System.out.println("You have entered the " + name + "."); + + } else if (isInTheCastle) { + System.out.println("You are already in the " + name + "."); + } else { + System.out.println("The " + name + " is not accessible right now."); + } + } + + /** + * Handles the logic for exiting the castle. + * Player can only exit if they are currently inside. + */ + public void exit() { + if (isInTheCastle) { + isInTheCastle = false; + System.out.println("You have exited the " + name + "."); + } else { + System.out.println("You are not in the " + name + " to exit."); + } + } +} \ No newline at end of file diff --git a/Design Justification.md b/Design Justification.md new file mode 100644 index 00000000..c78a4e20 --- /dev/null +++ b/Design Justification.md @@ -0,0 +1,11 @@ +# Design Justification +For this project, we designed a text-based adventure game inspired by Candy Land, where players journey through a series of themed challenges — Lollipop Castle, Frosted Palace, Nana’s Nuthouse, and finally, King Kandy’s Castle. + + Each location is implemented as a class extending from a common superclass (Castle or Paths), allowing us to structure the game using inheritance and encapsulation. + +We broke our code into separate classes so it was easier to manage and fix, and so each person could work on their part without getting in each other’s way. Each castle or location had its own challenge logic (e.g., a jumping challenge in Lollipop Castle, a number guessing game in Frosted Palace), which helped isolate bugs and made testing individual components easier. We also made sure the main method acted more as a narrative controller rather than duplicating logic. + +# Alternative Considered +One design alternative we discussed was using cards instead of a spinning wheel — or even incorporating both — to determine player movement. While the spinning wheel was simpler to implement programmatically using random numbers, incorporating cards could have added an element of memory or strategy but it was more time consuming to configure. If we had more time, we might have explored a hybrid mechanic that combines randomness with player choice. + + diff --git a/FullSpinner.java b/FullSpinner.java new file mode 100644 index 00000000..2baf8182 --- /dev/null +++ b/FullSpinner.java @@ -0,0 +1,95 @@ +import java.util.ArrayList; +import java.util.Random; + +/** + * The FullSpinner class simulates a spinner used in a board game. + * It randomly selects a color or candy tile from a predefined list. + * Special tiles (candies) can be removed once visited to prevent replay. + * + * This class supports adding spinner parts, removing special tiles, + * spinning for a random outcome, and displaying the result. + */ +public class FullSpinner { + private ArrayList parts; + private String part; + private Random random; + + /** + * Constructs a FullSpinner with an empty list of spinner parts + * and initializes the random number generator. + */ + public FullSpinner() { + this.parts = new ArrayList<>(); + this.random = new Random(); + } + + /** + * Populates the spinner with basic color tiles and special candy tiles. + * This method should be called before any spinning is performed. + */ + public void addParts() { + parts.add(new SpinnerPart("Red")); + parts.add(new SpinnerPart("Purple")); + parts.add(new SpinnerPart("Yellow")); + parts.add(new SpinnerPart("Blue")); + parts.add(new SpinnerPart("Orange")); + parts.add(new SpinnerPart("Green")); + parts.add(new SpinnerPart("Red")); + parts.add(new SpinnerPart("Purple")); + parts.add(new SpinnerPart("Yellow")); + parts.add(new SpinnerPart("Blue")); + parts.add(new SpinnerPart("Orange")); + parts.add(new SpinnerPart("Green")); + parts.add(new SpinnerPart("Red")); + parts.add(new SpinnerPart("Purple")); + parts.add(new SpinnerPart("Yellow")); + parts.add(new SpinnerPart("Blue")); + parts.add(new SpinnerPart("Orange")); + parts.add(new SpinnerPart("Green")); + + // Adding special candy tiles + parts.add(new SpinnerPart("Peppermint")); + parts.add(new SpinnerPart("Icecream")); + parts.add(new SpinnerPart("Licorice")); + parts.add(new SpinnerPart("Lollipop")); + parts.add(new SpinnerPart("Peanut")); + } + + /** + * Removes a special tile (e.g., candy) that has already been visited + * so it won't appear again in future spins. + * + * @param partName the name of the tile to remove from the spinner + */ + public void removeVisitedCandies(String partName) { + parts.removeIf(p -> p.getColor().equals(partName)); + } + + /** + * Spins the spinner and returns a randomly selected SpinnerPart. + * + * @return the randomly selected SpinnerPart + * @throws IllegalStateException if the spinner parts list is empty + */ + public SpinnerPart spin() { + if (parts.isEmpty()) { + throw new IllegalStateException("The spinner parts list is empty! Please add parts before spinning."); + } + + int index = random.nextInt(parts.size()); + SpinnerPart SpinnerOutput = parts.get(index); + + this.part = SpinnerOutput.getColor(); + return SpinnerOutput; + } + + /** + * Returns a string representation of the spin result. + * + * @return message indicating the tile the player spun + */ + @Override + public String toString() { + return "Congratulations! You have spun a " + this.part + ". You can now advance ahead to the " + this.part + " tile."; + } +} diff --git a/KingKandyCastle.java b/KingKandyCastle.java new file mode 100644 index 00000000..4c462033 --- /dev/null +++ b/KingKandyCastle.java @@ -0,0 +1,41 @@ +import java.util.Scanner; + +/** + * Represents King Kandy's Castle, the final destination in Candy Land. + * Players can only enter if they have the required key from Frosted Palace. + */ +public class KingKandyCastle extends Castle { + private boolean hasKeyToKingKandy; + + /** + * Constructor. + */ + public KingKandyCastle() { + super("King Kandy's Castle"); + this.hasKeyToKingKandy = false; + } + + /** + * Sets whether the player has the key to King Kandy's Castle. + * @param hasKey true if the player has the key, false otherwise. + */ + public void setHasKeyToKingKandy(boolean hasKey) { + this.hasKeyToKingKandy = hasKey; + } + + /** + * Attempts to enter King Kandy's Castle. + * Only allows entry if the player has the King Kandy key. + */ + public void attemptEntry() { + if (hasKeyToKingKandy) { // <<< use the local boolean here + Scanner scanner = new Scanner(System.in); + System.out.println("\n You have reached King Kandy's Castle!"); + System.out.print("Press Enter to step inside and claim your victory..."); + scanner.nextLine(); + System.out.println("\n Congratulations! You have WON the game!"); + } else { + System.out.println("\n You cannot enter King Kandy's Castle yet! You need the final key!"); + } + } +} \ No newline at end of file diff --git a/LicoriceLagoon.java b/LicoriceLagoon.java new file mode 100644 index 00000000..bc9263f4 --- /dev/null +++ b/LicoriceLagoon.java @@ -0,0 +1,88 @@ +import java.util.Scanner; + +/** + * Represents the Licorice Lagoon, a special location in the game where players + * must guess the number of licorice pieces to proceed and earn the key to Lollipop Castle. + */ +public class LicoriceLagoon extends PathPlaces { + private static boolean hasKeyToLollipop = false; + + /** + * Constructs a new Licorice Lagoon with the specified name and player input. + * + * @param name the name of this location + * @param playerInput the initial player input value + */ + public LicoriceLagoon(String name, int playerInput) { + super(name, playerInput); + } + + /** + * Displays the welcome message and challenge description for the Licorice Lagoon. + */ + public void printPathName() { + System.out.println("You have entered the Licorice Lagoon! You are ready to begin your next challenge. " + + "From 2000 - 5000, how many licorice make up the Lagoon?"); + } + + /* + * When you land in the lagoon you will need to guess a number. + * If you guess it incorectly, you will get a random trivia question. + * ArrayList of the trivia questions. + */ + + /** + * Starts the licorice counting challenge. + * Players must guess a number between 2000 and 5000. + * Odd numbers allow direct progression, while even numbers require answering a trivia question. + * + * @return true if the player has earned the key to Lollipop Castle + */ + public Boolean startChallenge() { + Scanner scanner = new Scanner(System.in); + int playerInput = scanner.nextInt(); + String question = triviaQuestions.get(this.random.nextInt(triviaQuestions.size())); + + hasKeyToLollipop = true; + if (playerInput >= 2000 && playerInput <= 5000) { + if (playerInput % 2 != 0) { + System.out.println("Aha! I see you have done your research! " + playerInput + + " licorice make up the Lagoon. You can advance to the next tile."); + } else { + System.out.println("Oh no! " + playerInput + + " is not the correct number of licorice that make up the Lagoon. " + + "You must complete the following trivia question to move to the next tile. " + + question); + scanner.nextLine(); + String response = scanner.nextLine(); + System.out.println("Well done! You have completed the challenge and may progress to the next tile."); + } + } else { + System.out.println("Please enter a number between 2000 and 5000."); + } + System.out.println("Yay! You also just acquired the key to Lollipop Castle. Keeping it in your inventory for now."); + return hasKeyToLollipop; + } + + /** + * Displays a success message when the player completes the challenge. + */ + public void finalSentiment() { + System.out.println("That's right! You have completed the challenge and may progress to the next tile."); + } + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + LicoriceLagoon llTest = new LicoriceLagoon("Licorice Lagoon", 2003); + llTest.printPathName(); + + + try { + Boolean result = llTest.startChallenge(); + System.out.println("Result: " + result); + } catch (IllegalArgumentException e) { + System.err.println("Error: " + e.getMessage()); + } + } +} \ No newline at end of file diff --git a/LollipopCastle.java b/LollipopCastle.java new file mode 100644 index 00000000..a4ba29ab --- /dev/null +++ b/LollipopCastle.java @@ -0,0 +1,83 @@ +import java.util.Scanner; + +/** + * Represents the Lollipop Castle in Candy Land. + * Players must complete a jumping challenge to proceed toward the Frosted Palace. + */ +public class LollipopCastle extends Castle { + private boolean hasKeyToFrostedPalace; + private double height; + + /** + * Constructs a new Lollipop Castle. + */ + public LollipopCastle() { + super("Lollipop Castle"); + this.hasKeyToFrostedPalace = false; + this.height = 0; + } + + /** + * Starts the jumping challenge at Lollipop Castle. + * If the player jumps between 200–400, they succeed and teleport closer to the Frosted Palace. + * Even if they fail the jump, they still receive the key but must take a longer route. + * + * @param hasKey A boolean indicating if the player has the required key to enter. + */ + public void startChallenge(boolean hasKey,Player player) { + if (!hasKey) { + System.out.println("You cannot enter Lollipop Castle without the key to the Frosted Palace."); + return; + } + + Scanner scanner = new Scanner(System.in); + System.out.println("Welcome to Lollipop Castle!A space in which the gravity is fickle and there's obstacles at each turn"); + // System.out.println("Jump too low = caramel abyss. Jump too high = sucked into space."); + + boolean validJump = false; + + while (!validJump) { + System.out.print("You are faced with several lollipop barred fences preventing you from escaping.\n The only way out is to utilize the weird gravity to jump out of the castle.\n But beware, your jumps may have consequences!\n How high would you like to jump ?"); + + if (scanner.hasNextDouble()) { + height = scanner.nextDouble(); + scanner.nextLine(); // consume leftover newline + + if (height < 100 || height > 500) { + System.out.println("Invalid jump height. Must be between 100 and 500. Try again."); + } else { + validJump = true; // exit the loop + + if (height >= 200 && height <= 400) { + System.out.println("Perfect jump! You land safely on the other side."); + player.setPositionIndex(52); + System.out.println("Schwooop! You are teleported to the Frosted Palace! I hope you have a coat!"); + } else if (height < 200) { + System.out.println("Too low! You fall into the gooey caramel abyss.......and fell to you death ! "); + player.setIsAlive(false); + } else { + System.out.println("Too high! You’re sucked into the gaping void of space... and you unfortunately did not make it back"); + player.setIsAlive(false); + } + } + } else { + System.out.println("Please enter a valid number."); + scanner.next(); + } + } + + + // Regardless of success or failure, the player gets the key + this.hasKeyToFrostedPalace = true; + this.isAccessible = true; + } + + /** + * Checks if the player has earned the key to the Frosted Palace. + * + * @return true if the player has the key, false otherwise. + */ + public boolean hasKeyToFrostedPalace() { + return hasKeyToFrostedPalace; + } +} \ No newline at end of file diff --git a/Main.java b/Main.java new file mode 100644 index 00000000..e193208e --- /dev/null +++ b/Main.java @@ -0,0 +1,186 @@ + +import java.util.ArrayList; +import java.util.Scanner; + +/** + * Main class that runs the Candy Land game. + * Guides the player through spinning, moving, and entering special locations. + */ +public class main { + + public static void main(String[] args) { + //scanner + Scanner scanner = new Scanner(System.in); + + //making the spinner + FullSpinner spinner = new FullSpinner(); + spinner.addParts(); + spinner.spin(); + + //making the map + ArrayList map = new ArrayList<>(); + String[] colors = {"Red", "Purple", "Yellow", "Blue", "Orange", "Green"}; + + + for (int i = 0; i < 60; i++){ + String color = colors[i % colors.length]; + String location = "None"; + + //setting locations so that we can assign tiles to specific special locations + + + if (i == 15) { + location = "Peppermint"; + } + + else if (i ==22){ + location = "Nana's Nuthouse"; + } + + else if (i ==37){ + location = "Licorice Lagoon"; + } + + else if (i ==47){ + location = "Lollipop Castle"; + } + + else if (i ==52){ + location = "Frosted Palace"; + } + + + + Map tiles = new Map(false, color, "None"); + map.add(tiles); + } + + + String name = Player.enterName(); + Player player = new Player(name,0); + + //starting display + + System.out.println("Welcome to Candy Land, " + name + " "); + + System.out.println("You are currently on Tile " + player.getCurrPosition()); + + // Main game loop + while (player.getIsAlive()) { + System.out.println("\n Spin the wheel to move forward!"); + System.out.print("Press Enter to spin the wheel..."); + + scanner.nextLine(); + SpinnerPart SpinnerOutput = spinner.spin(); + String part = SpinnerOutput.getColor(); + + System.out.println(spinner); + + System.out.println("Congratulations! You have spun a " + SpinnerOutput.getColor() + ". You can now advance ahead to the " + SpinnerOutput.getColor() + " tile."); + + + //moving our player using our spinner output + player.move(SpinnerOutput,map); + spinner.removeVisitedCandies(part); + + //displaying our players movements + Player.displayMotion(player, map); + + + // Handle special locations + String currPosition = SpinnerOutput.getColor(); + + if (player.getPositionIndex() == 15 || currPosition.equals("Peppermint")) { + + System.out.println("Suddenly, you are surrounded by the sweet,cool,minty aroma of peppermint . Before your very eyes immense red and white pinstriped trees sprout from the floor and surround you. You are now in ......the Peppermint forest.To wander deeper in, enter any number."); + int playerInput = scanner.nextInt(); + PeppermintForest peppermint = new PeppermintForest("Peppermint Forest",playerInput); + scanner.nextLine(); + peppermint.printPathName(); + PeppermintForest.startChallenge(); + } + + + + else if (player.getPositionIndex() == 22 || currPosition.equals("Peanut") ) { + + System.out.println("Awww nuts!!!You find yourself infront of the delicious...yet very dangerous Nana's nuthouse. To advance, press any number to come in !"); + int playerInput = scanner.nextInt(); + NanaNutHouse nana = new NanaNutHouse("Nana's Nuthouse",playerInput); + scanner.nextLine(); + + boolean crossedBridge = nana.chocoBridgeNumber(player, scanner); + + if (crossedBridge) { + System.out.println("Teleporting you to Licorice Lagoon..."); + System.out.println("It's sticky ! It's sweet ! And it has gotten up to your knees! You have stumbled into the sticky.....Licorice Lagoon. Waddle in! Discover more! And to do so , just enter your favorite number here!"); + playerInput = scanner.nextInt(); + LicoriceLagoon lagoon = new LicoriceLagoon("Licorice Lagoon", playerInput); + lagoon.printPathName(); + scanner.nextLine(); + lagoon.startChallenge(); + } + + + } + + else if (player.getPositionIndex() == 37 || currPosition.equals("Licorice") ) { + System.out.println("It's sticky ! It's sweet ! And it has gotten up to your knees! You have stumbled into the sticky.....Licorice Lagoon. Waddle in! Discover more! And to do so , just enter your favorite number here!"); + int playerInput = scanner.nextInt(); + + LicoriceLagoon lagoon = new LicoriceLagoon("Licorice Lagoon",playerInput); + lagoon.printPathName(); + scanner.nextLine(); + lagoon.startChallenge(); + } + + + + else if (player.getPositionIndex() == 47 || currPosition.equals("Lollipop")) { + System.out.println("You made it to Lollipop Castle! Behold the glory !!!!!!!!!\n To proceed , whisper any number to us."); + int playerInput = scanner.nextInt(); + LollipopCastle lollipop = new LollipopCastle(); + Boolean hasKey = true; + lollipop.startChallenge(hasKey,player); + scanner.nextLine(); + + if (player.getPositionIndex() == 52) { + System.out.println("You’ve reached the Frosted Palace."); + int palaceInput = scanner.nextInt(); + FrostedPalace frosted = new FrostedPalace(); + frosted.startChallenge(player); + scanner.nextLine(); +} + + + } + else if (player.getPositionIndex() == 52 || currPosition.equals("Icecream")) { + System.out.println("You’ve reached the Frosted Palace. Enter any number to step inside"); + int playerInput = scanner.nextInt(); + FrostedPalace frosted = new FrostedPalace(); + frosted.startChallenge(player); + scanner.nextLine(); + } + + // End of Game + if (player.getPositionIndex() ==60 ) + { if (player.getHasFrostedKey()){ + System.out.println("\n You’ve arrived at King Kandy’s Castle!"); + System.out.println(" YOU WIN! Sweet victory is yours!"); + player.setHasWon(true); + } else { + System.out.println("\n You reached the castle, but you don't have the final key! Find the Frosted Palace first."); + } + } + + + // Check if the player has died + if (!player.getIsAlive()) { + System.out.println("\nOh no! You didn’t survive the journey. Game Over."); + } + } + + scanner.close(); + + } +} diff --git a/Map.java b/Map.java new file mode 100644 index 00000000..5dc5f11a --- /dev/null +++ b/Map.java @@ -0,0 +1,95 @@ +/** + * Represents a tile on the game board in Candy Land. + * Each tile has a position status, color, and may contain a special location. + * Tiles are used to track player movement and special locations on the board. + */ +public class Map { + private Boolean position; + private String colorBlocks; + private String playerPosition; + + /** + * Constructs a new Map tile with specified position, color, and player position. + * + * @param position indicates if this is a valid position on the board + * @param colorBlocks the color of this tile + * @param playerPosition the name of the special location if any, or "None" + */ + public Map(Boolean position, String colorBlocks, String playerPosition) { + this.position = position; + this.colorBlocks = colorBlocks; + this.playerPosition = playerPosition; + } + + /** + * Gets the position status of this tile. + * + * @return true if this is a valid position on the board + */ + public Boolean indexPosition() { + return this.position; + } + + /** + * Gets the color of this tile. + * + * @return the color of this tile + */ + public String gameBlocks() { + return this.colorBlocks; + } + + /** + * Gets the name of the special location on this tile. + * + * @return the name of the special location or "None" if no special location + */ + public String getPlayerPosition() { + return this.playerPosition; + } + + /** + * Sets the name of the special location on this tile. + * + * @param playerPosition the name of the special location + */ + public void setPlayerPosition(String playerPosition) { + this.playerPosition = playerPosition; + } + + /** + * Sets the color of this tile. + * + * @param colorBlocks the new color for this tile + */ + public void setColorBlocks(String colorBlocks) { + this.colorBlocks = colorBlocks; + } + + /** + * Sets the position status of this tile. + * + * @param position the new position status + */ + public void setIndexPosition(Boolean position) { + this.position = position; + } + + /** + * Gets the color of this tile. + * + * @return the color of this tile + */ + public String getColor() { + return this.colorBlocks; + } + + /** + * Gets the name of the special location on this tile. + * + * @return the name of the special location or "None" if no special location + */ + public String getLocation() { + return this.playerPosition; + } +} \ No newline at end of file diff --git a/NanaNutHouse.java b/NanaNutHouse.java new file mode 100644 index 00000000..9ff5763d --- /dev/null +++ b/NanaNutHouse.java @@ -0,0 +1,57 @@ +import java.util.Scanner; + +/** + * Represents Nana's Nut House, a special location in the game where players + * must complete a number-based challenge to cross a chocolate bridge. + */ +public class NanaNutHouse extends PathPlaces { + private static boolean hasKeyToLollipop = false; + + /** + * Constructs a new Nana's Nut House with the specified name and player input. + * + * @param name the name of this location + * @param playerInput the initial player input value + */ + public NanaNutHouse(String name, int playerInput) { + super(name, playerInput); + } + + /** + * Handles the chocolate bridge challenge at Nana's Nut House. + * If the player's number is odd, they can cross the bridge directly to Licorice Lagoon. + * If even, they must answer a trivia question and take the long way. + * + * @param player the player attempting the challenge + * @param scanner the scanner for reading player input + * @return true if the player successfully crosses the bridge, false otherwise + */ + public Boolean chocoBridgeNumber(Player player, Scanner scanner) { + System.out.println("Welcome to Nana's Nut House, Sugar! You are ready to begin your challenge. " + + "Please choose a magic number."); + + int playerInput = scanner.nextInt(); + String question = triviaQuestions.get(this.random.nextInt(triviaQuestions.size())); + + if (this.playerInput % 2 != 0) { + System.out.println("Congratulations! Your magic number " + this.playerInput + + " has unlocked the chocolate bridge. You advance to Licorice Lagoon!"); + player.setPositionIndex(37); + return true; + } else { + System.out.println("Oh no! Your number " + playerInput + + " has broken the chocolate bridge! You will have to take the long way " + + "after you answer this trivia question. " + question); + scanner.nextLine(); + String response = scanner.nextLine(); + return false; + } + } + + /** + * Displays a success message when the player completes the challenge. + */ + public void finalSentiment() { + System.out.println("That's right! You have completed the challenge and may progress to the next tile."); + } +} \ No newline at end of file diff --git a/PathPlaces.java b/PathPlaces.java new file mode 100644 index 00000000..5a1e89df --- /dev/null +++ b/PathPlaces.java @@ -0,0 +1,64 @@ +/** + * PathPlaces is the base class that each Peppermint Forest, Licorice Lagoon, and Nana's Nut House inherit from in this game. + * Each location, or Path Place, has a name and a number guessing challenge. If correct the player proceeds and if incorrect, the player must answer a trivia question stored in triviaQuestions. The player will then proceed upon answering the question. + * The following imports, a scanner and an arraylist are necessary for PathPlaces. +*/ + +import java.util.ArrayList; +import java.util.Random; +import java.util.Scanner; +/** + * The following attributes are for Path Places and each subclass; Peppermint Forest, Nana's Nut House, and Licorice Lagoon. The trivia questions are stored in an Array List. +*/ + +public class PathPlaces { + protected String name; + protected int playerInput; + protected ArrayList triviaQuestions; + protected Random random; + protected Boolean hasKey = false; + + + /** + * The following constructor includes these paramenters: + * @param name + * @param playerInput + */ + public PathPlaces(String name, int playerInput) { + this.name = name; + this.playerInput = playerInput; + this.triviaQuestions = new ArrayList<>(); + this.random = new Random(); + this.addString(); + } +/** + * printPathName will print the name of each subclass. + * getPathName obtains the name of the subclass. + * addString are the questions stored in the array list triviaQuestions. Initially a hashtable was going to be used, but for simplicity purposes an array list seemed to work better at this time. + */ + public void printPathName() { + System.out.println("Welcome to " + this.name + "!"); + } + + + + public String getPathName() { + return this.name; + } +/** + * Adds a predefined set of trivia questions to the triviaQuestions list. + * This method adds fun questions related to characters and settings in the Candy Land game to the list. + */ +protected void addString() { + triviaQuestions.add("What is the one secret to Nana's bizcocho recipe?"); + triviaQuestions.add("What is Queen Kandy's favorite color?"); + triviaQuestions.add("What animal does Queen Kandy dream of having in her Castle?"); +} +/** + * Main Method + * @param args + */ +public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); +} +} \ No newline at end of file diff --git a/PeppermintForest.java b/PeppermintForest.java new file mode 100644 index 00000000..5f55010a --- /dev/null +++ b/PeppermintForest.java @@ -0,0 +1,64 @@ +import java.util.ArrayList; +import java.util.Random; +import java.util.Scanner; + +/** + * Represents the Peppermint Forest, a special location in the game where players + * must guess the number of candy canes to proceed. + */ +public class PeppermintForest extends PathPlaces { + private String name; + private int playerInput; + private ArrayList triviaQuestions; + private boolean hasKey = false; + private static boolean hasKeyToLollipop = false; + private Random random; + + /** + * Constructs a new Peppermint Forest with the specified name and player input. + * + * @param name the name of this location + * @param playerInput the initial player input value + */ + public PeppermintForest(String name, int playerInput) { + super(name, playerInput); + } + + /** + * Displays the welcome message and challenge description for the Peppermint Forest. + */ + public void printPathName() { + System.out.println("You have entered the Peppermint Forest! With the aroma of peppermint candy canes, " + + "mint chocolate chip, and sugar, you are ready to begin your first challenge. " + + "From 1 - 10000, how many peppermint candy canes make up the Peppermint Forest?"); + } + + /** + * Starts the candy cane counting challenge. + * Players must guess a number between 1 and 10000. + * Odd numbers are considered correct and allow players to proceed directly. + * Even numbers require players to take the long way. + * + * @throws IllegalArgumentException if the input is not between 1 and 10000 + */ + public static void startChallenge() { + Scanner scanner = new Scanner(System.in); + int playerInput = scanner.nextInt(); + + if (playerInput >= 1 && playerInput <= 10000) { + if (playerInput % 2 != 0) { + System.out.println("Way to go! Exactly " + playerInput + + " peppermint candy canes make up the Peppermint Forest! " + + "You can advance to the next tile. Remember to grab a candy cane on your way out."); + } else { + System.out.println("Unfortunately " + playerInput + + " is not the correct amount of peppermint candy canes that make up the Peppermint Forest. " + + "You can continue on your path, but you may not take a peppermint candy cane. Good luck!"); + } + } else { + throw new IllegalArgumentException("Please enter a number between 1 and 10000."); + } + } +} + + \ No newline at end of file diff --git a/Player.java b/Player.java new file mode 100644 index 00000000..a316f75e --- /dev/null +++ b/Player.java @@ -0,0 +1,234 @@ +import java.util.ArrayList; +import java.util.Scanner; + +/** + * The Player class represents a player in the board game. + * It manages the player's name, position on the board, status (alive or not), + * whether they possess a key, and their movement based on spinner output. + */ +public class Player { + private String name; + private int positionIndex; + private String currPosition; + private Boolean isAlive; + private Boolean hasFrostedKey = false; + private ArrayList tiles; + + /** + * Constructs a Player with a given name and starting position. + * + * @param name the name of the player + * @param position the starting position (typically 0) + */ + public Player(String name, int position) { + this.name = name; + this.currPosition = "red"; // Starting position name + this.positionIndex = 0; + this.isAlive = true; + this.tiles = new ArrayList<>(); + } + + /** + * Prompts the user to enter their name. + * + * @return the player's name entered from console + */ + public static String enterName() { + Scanner sc = new Scanner(System.in); + System.out.println("Hello Player! Enter your name:"); + String name = sc.nextLine(); + return name; + } + + /** + * Returns whether the player is currently alive. + * + * @return true if alive, false otherwise + */ + public Boolean getIsAlive() { + return isAlive; + } + + /** + * Sets the alive status of the player. + * + * @param alive boolean representing whether the player is alive + */ + public void setIsAlive(boolean alive) { + this.isAlive = alive; + } + + /** + * Gets the player's name. + * + * @return the player's name + */ + public String getName() { + return name; + } + + /** + * Gets the player's current index position on the board. + * + * @return the current position index + */ + public int getPositionIndex() { + return positionIndex; + } + + /** + * Sets the player's position index on the board. + * + * @param positionIndex the new position index + */ + public void setPositionIndex(int positionIndex) { + this.positionIndex = positionIndex; + } + + /** + * Returns whether the player has the Frosted Key. + * + * @return true if the player has the Frosted Key, false otherwise + */ + public Boolean getHasFrostedKey() { + return hasFrostedKey; + } + + /** + * Sets whether the player has obtained the Frosted Key. + * + * @param hasFrostedKey true if the player has the key, false otherwise + */ + public void setHasFrostedKey(Boolean hasFrostedKey) { + this.hasFrostedKey = hasFrostedKey; + } + + /** + * Returns the name of the current position the player is on. + * + * @return the name of the current tile + */ + public String getCurrPosition() { + return currPosition; + } + + public static void updateBoard(Player player, ArrayList board) { + for (int i = 0; i < board.size(); i++) { + if (i == player.getPositionIndex()) { + board.get(i).setPlayerPosition(player.getName()); + } else { + board.get(i).setPlayerPosition("None"); + } + } + } + + /** + * Moves the player forward on the board until they land on a tile + * that matches the spinner result. The player advances by checking each + * tile from their current position until a match is found. + * + * @param SpinnerOutput the result from spinning the spinner + * @param tiles the list of Map tiles representing the game board + * @return the name of the tile the player landed on + */ + public String move(SpinnerPart SpinnerOutput, ArrayList tiles) { + + while(this.positionIndex < tiles.size()&&!tiles.get(this.positionIndex).getColor().equals(SpinnerOutput.getColor())) { + this.positionIndex += 1; + } + + + if (this.positionIndex >= tiles.size()) { + this.positionIndex = tiles.size() - 1; + } + + + this.currPosition = SpinnerOutput.getColor(); + System.out.println("You have now advanced to the " + currPosition +" tile"); + Player.updateBoard(this, tiles); + return currPosition; + + + } + + /** + * Displays the player's progress on the board using a simple visual layout. + * + * @param player the player whose position is displayed + * @param boardSize the total size of the board + */ + + public static void displayMotion(Player player, ArrayList board) { + System.out.println("\n~~~ Map ~~~"); + + StringBuilder display = new StringBuilder(); + + for (int i = 0; i < board.size(); i++) { + Map tile = board.get(i); + + + String special = tile.getPlayerPosition(); + String symbol = ""; + + if (i == player.getPositionIndex()) { + // Show player's initial + symbol = "|~~" + player.getName().charAt(0) + "~~||"; + + + } + else if (!tile.getPlayerPosition().equals("None")) + { + // Use emojis or symbols for special locations + switch (tile.getPlayerPosition()) + { + case "Peppermint": + symbol = "|P|"; + break; + case "Nana's Nuthouse": + symbol = "|🥜|"; + break; + case "Licorice Lagoon": + symbol = "|🍬|"; + break; + case "Lollipop Castle": + symbol = "|🏰|"; + break; + case "Frosted Palace": + symbol = "|❄️|"; + break; + }} + else { + // Show tile color's first letter + symbol = "|_" + tile.getColor().charAt(0) + "_|"; + + } + display.append(symbol); + + + if ((i + 1) % 10 == 0) { + display.append("\n"); + } + } + + System.out.println(display.toString()); +} + + + + + /** + * Placeholder method to set whether the player has won. + * Consider implementing this properly or renaming it for clarity. + * + * @param b true if the player has won + * @return the same boolean value passed in + */ + public Boolean setHasWon(boolean b) { + return b; + } + + void setCurrPosition(String color) { + throw new UnsupportedOperationException("Not supported yet."); + } +} + diff --git a/Reflections.md b/Reflections.md new file mode 100644 index 00000000..0835beb2 --- /dev/null +++ b/Reflections.md @@ -0,0 +1,28 @@ +# Reflections + +## Milka: + +The overall approach for this project was to build a fun computer version of the candy land board game. In this project we implemented various things to make its functionality a very smooth one. We divided each special location in our game by functionality. I learned how to make a functional map in this case using arrays. At first we had planned to use graphics to create a spin wheel but we couldn't make it due to the time factor. If we had more time we would definitely implement that. If I could go back in time and give my past self some advice about this project I would definitely advise her to experiment with different ways of doing this as in the world of programming there are so many ways to approach the same problem. This project wouldn't be the same without my teammates. We all worked really hard to make this project successful. There were ups and downs as well as some rocks along the road but we managed to make this project come into life. I really enjoyed my time with this project and my teammates. I learned something from every single one of them. + +## Maylynn: + +The final project would not have been possible without the hard work, dedication, bright ideas, and diversity of thought and experiences each group member put forth. Our overall approach to this project was dividing tasks and using a time sensitive approach to them. There were moments of high-stress and conflict resolution, and we got through. With unlimited time, I would like to create more complex challenges in PathPlaces. I learned so much about myself as a coder; namely my growth from the beginning of the semester. I learned the structure and necessary parts of a code and proper implementation of parent and subclasses. + + +## Tabitha: +For this project, we broke the work into manageable milestones—designing the classes first, implementing each challenge individually, and finally integrating everything through the main method. This structure helped keep us organized and allowed us to make steady progress. + I personally learned how to apply object-oriented design principles more effectively, especially using inheritance. +Early on, we thought about using cards instead of a spinning wheel—or even using both—but ultimately stuck with the wheel for simplicity. With more time, I would’ve loved to add richer storytelling, a graphical user interface, or a leaderboard system to increase engagement. + +One of the most helpful pieces of feedback we received was a suggestion to include stronger consequences for incorrect guesses, which inspired the freezing mechanic in Frosted Palace. + +We divided the work by classes and communicated frequently, which really helped. Each of us took ownership of different sections of the game, but we regularly tested and reviewed each other’s contributions to ensure consistency. While there were definitely some bumps along the way, I’m proud of the collaboration and how we saw the project through to the end.I am grateful for all that I learned from my teammates throughout the duration of this project. + +## Meron: +Meron: +I really enjoyed doing this project because I was able to employ several aspects of object-oriented programming, and it felt like all the concepts we had been learning in class came together in really engaging way. My team and I worked together on building an object-oriented Java version of the game Candy Land. We all worked on separate classes , brainstormed methods to bring our ideas for our challenges in our game to life, wrote several lines of pseudocode, and asked ourselves the question: “How can this be achieved via code?” several times, before employing a lot of our knowledge on Java syntax and on Inheritance, Aggregation and other relationships between our classes. Through this collaboration, I not only became proficient at object-oriented programming, but I feel as though I have developed the skills to tackle other bigger projects through detailed planning , time management and most importantly working in team settings, learning to delegate ,integrating different ideas together and how to best work with Github when there’s a larger team which are skills that I know I will need in the future as a software developer. + +To summarize our process, we started by discussing what our classes would look like and how they would interact.We split up the classes evenly and we decided to meet once a week –additional to our in-class meetings– to ensure that we were making sufficient progress. I initially was focused on creating the Player class and the FullSpinner and the SpinnerPart class,but later I focused on making our main class for smooth and interactive game play , which is when I felt like I was when I was learning the most about class interactions through debugging and also thinking about several solutions to problems and looking at the pros and cons of each - talking it out with my teammates and at office hours before finally deciding on a solution. +If I had more time I would have liked to implement graphics into this project, I had the idea to use the Print Stream Package to store everything we were printing out so I could then set up a Graphics window using Java Swing for a more aesthetically pleasing UI. +The most useful feedback was probably Professor Jordan’s advice on structuring my move method because I had initially thought of making the player move to specific locations by skipping to them and wanted to implement (mod 6) so it could could skip by the remainder of every six tiles,but Professor Jordan had advised me to use a while loop instead for a more step by step movement , which would be much easier to code. This helped me realize that there are always simpler ways to solve a problem and I tried to employ that for the rest of the project. I’d also go back and give myself that same advice- to not overcomplicate. + diff --git a/SpinnerPart.java b/SpinnerPart.java new file mode 100644 index 00000000..35e24345 --- /dev/null +++ b/SpinnerPart.java @@ -0,0 +1,51 @@ + +/** + * The SpinnerPart class represents a single part of the game spinner. + * Each SpinnerPart has a color or a special item name (e.g., a candy tile). + * These parts are used by the FullSpinner to simulate spinning results. + */ +public class SpinnerPart { + private String Item; + private String Color; + + + /** + * Constructs a SpinnerPart with a specified color or name. + * + * @param Color the color or name of the spinner part + */ + public SpinnerPart(String Color) { + this.Color = Color; + } + + /** + * Returns the color or name of this SpinnerPart. + * + * @return the color or name string + */ + public String getColor() { + return Color; + } + + /** + * Returns the item associated with this SpinnerPart (if any). + * Currently unused but can be expanded for additional game features. + * + * @return the item string + */ + public String getItem() { + return Item; + } + + +} + + + + + + + + + + diff --git a/architechture diagram.png b/architechture diagram.png new file mode 100644 index 00000000..9e651e6b Binary files /dev/null and b/architechture diagram.png differ diff --git a/cheatsheet.md b/cheatsheet.md index d5dc4294..0846bae5 100644 --- a/cheatsheet.md +++ b/cheatsheet.md @@ -2,7 +2,59 @@ This file will contain documentation for all commands available in your game. Note: It's a good idea to also make this list available inside the game, in response to a `HELP` command. - # SPOILER ALERT If your game includes challenges that must be overcome to win, also list them below. + + +# Candy Land Game Cheatsheet + +## Game Overview +Candy Land is a text-based adventure game where players navigate through a magical candy-themed world, completing challenges and collecting keys to reach Queen Kandy's Castle. + +## Basic Commands +- Press `Enter` to spin the spinner +- Enter a number when prompted to proceed through challenges +- The game will automatically display your position on the map after each move + +## Game Map Layout +The game board consists of 60 tiles with the following special locations: +- Tile 15: Peppermint Forest +- Tile 22: Nana's Nuthouse +- Tile 37: Licorice Lagoon +- Tile 47: Lollipop Castle +- Tile 52: Frosted Palace +- Tile 60: King Kandy's Castle + + +# Special Locations and Challenges +1. Peppermint Forest Challenge : Guess a number between 1 and 10,000. If the number is odd, player may take a candy cane and proceed. If the number is even, player continues without a candy cane. Note there is no serious consequence, just a light challenge. Goal: Flavorful stop, minimal risk. + +2. Nana's Nuthouse Challenge: Select a magic number. If the number is odd, player unlocks the chocolate bridge and advances to the Licorice Lagoon. If the number is even, player breaks the chocolate bridge and must answer a random trivia question. The trivia question just requires player input; there is no right or wrong answer to advance. Goal: Successfully cross to reach Licorice Lagoon. + +3. Licorice Lagoon Challenge: Guess a number challenge, from 2000 - 5000 how many licorice make up the lagoon. If the player inputs an odd number, they proceed directly to Lollipop Castle. If the player inputs an even number, they must answer a random trivia question. If the trivia question is correct, the player will go directly to Lollipop Castle by unlocking the key. If the trivia question response is incorrect, the player will take the long path to Lollipop Castle. Goal: Earn the key to Lollipop Castle. + +4. Lollipop Castle Challenge: Requirement: You must have the key from Licorice Lagoon to enter. The challenge is to choose a jumping number. If the player chooses one of the correct numbers between 200 and 400, the player succeeds, survives, and is teleported to Frosted Palace. If the player does not choose the correct number, they fail the challenge and will have to take the long way to the Frosted Palace. Goal: Earn the key to Frosted Palace by attempting the challenge. + +5. Frosted Palace Challenge: Requirement: Must have the key from Lollipop Castle to enter. The challenge is the guessing game in the cold. The player must guess a number between 1 and 10. The player's temperature drops as they guess the incorrect number. If the player guesses the number correctly, on the first try, they are teleported directly to King Kandy's Castle. If the player guesses correctly later, they get the kep but must take the long way to King Kandy's Castle. If the temperature drops to 0°F the player freezes to death. The goal is to survive and earn the key to King Kandy’s Castle. + +6. King Kandy's Castle (Tile 60) +You must have the Key from the frosted palace. +This is the final destination. +Once you get in the castle,you've won the game. + +## Winning Conditions +To win the game, you must: +- Reach King Kandy's Castle + +## Losing Conditions +You lose if: +1. You freeze to death in the Frosted Palace +2. You fall into the caramel abyss in Lollipop Castle +3. You get sucked into space in Lollipop Castle + +## Tips +- Always try to guess odd numbers in the early challenges +- Be careful with your jumps in Lollipop Castle +- Watch your temperature in the Frosted Palace +- Keep track of which keys you've collected diff --git a/frostedPalace.java b/frostedPalace.java new file mode 100644 index 00000000..5a1d3c6d --- /dev/null +++ b/frostedPalace.java @@ -0,0 +1,145 @@ +import java.util.Random; +import java.util.Scanner; + +/** + * Represents the Frosted Palace in Candy Land. + * Players must guess a number to earn the key to King Kandy's Castle. + * Entry is only allowed if the player has the Frosted Palace key. + */ +public class FrostedPalace extends Castle { + + private static int correctNumber; + private static int temperature; + private static boolean hasKeyToKingKandy; + private static boolean teleportedToKingKandy; + + /** + * Constructs a new Frosted Palace. + * Initializes challenge values. + */ + public FrostedPalace() { + super("Frosted Palace"); + this.correctNumber = generateRandomNumber(); + this.temperature = 98; + this.hasKeyToKingKandy = false; + this.teleportedToKingKandy = false; + } + + /** + * Attempts to enter the Frosted Palace. + * Only allows entry if the player has the key from Lollipop Castle. + * + * @param hasKeyFromLollipopCastle true if player has the key, false otherwise + */ + public static void enter(boolean hasKeyFromLollipopCastle,Player player) { + if (hasKeyFromLollipopCastle) { + System.out.println("\nYou used the key to enter the Frosted Palace!"); + startChallenge(player); + } else { + System.out.println("\nYou cannot enter the Frosted Palace without the key from Lollipop Castle!"); + } + } + + + /** + * Checks if the player has earned the key to King Kandy's Castle. + * + * @return true if the player has the key, false otherwise + */ + public boolean hasKeyToKingKandy() { + this.correctNumber = generateRandomNumber(); + this.temperature = 98; + this.hasKeyToKingKandy = false; + this.teleportedToKingKandy = false; + return hasKeyToKingKandy; + } + + + + /** + * Starts the freezing number-guessing challenge. + * If guessed correctly on the first try, player is teleported to King Kandy. + * Otherwise, the player either gets the key after more trials or freezes to death. + */ + public static void startChallenge(Player player) { + Scanner scanner = new Scanner(System.in); + System.out.println("\nYou've made your way to the coldest corner of Candy Land....the Frosted Palace.....Welcome."); + System.out.println("Guess the number between 1 and 10. It's freezing in here!"); + + boolean firstAttempt = true; + + while (temperature > 0 && !hasKeyToKingKandy) { + System.out.print("Enter your guess: "); + if (scanner.hasNextInt()) { + int guess = scanner.nextInt(); + + if (guess == correctNumber) { + System.out.println("Correct! You survived and earned the key to King Kandy’s Castle!"); + hasKeyToKingKandy = true; + FrostedPalace.isAccessible = true; + + if (firstAttempt) { + System.out.println("You guessed correctly on the first try! Teleporting you directly to King Kandy’s Castle..."); + teleportedToKingKandy = true; + player.setPositionIndex(60); + } else { + System.out.println("You guessed correctly, but you must take the long way to reach King Kandy’s Castle."); + teleportedToKingKandy = false; + } + break; + } else { + temperature -= 10; + System.out.println("Incorrect! Your body temperature is now: " + temperature + "°F"); + if (checkFrozen()) { + System.out.println("You froze to death in the Frosted Palace..."); + player.setIsAlive(false); + return; + } + } + firstAttempt = false; + } else { + System.out.println("Please enter a valid number."); + scanner.next(); // clear invalid input + } + } + } + + /** + * Checks if the player has earned the key to King Kandy's Castle. + * + * @return true if the player has the key, false otherwise + */ + public boolean hasKeyToKingKandy(Player player) { + return hasKeyToKingKandy; + } + + /** + * Checks if the player teleported directly to King Kandy's Castle. + * + * @return true if teleported, false otherwise + */ + public boolean wasTeleported() { + return teleportedToKingKandy; + } + + /** + * method to check if the player froze. + * + * @return true if frozen, false otherwise + */ + public static boolean checkFrozen() { + return temperature <= 0; + } + + + + /** + * Generates a random number between 1 and 10. + * + * @return a random number between 1 and 10 + */ + private int generateRandomNumber() { + Random rand = new Random(); + return rand.nextInt(10) + 1; + } +} \ No newline at end of file diff --git a/rubric.md b/rubric.md index 8bb8f4c8..e77a078f 100644 --- a/rubric.md +++ b/rubric.md @@ -1,48 +1,48 @@ ## Front-End Design (10 pts) -_____ 2 pts: Game has a **robust, understandable text-based interface** that allows the player to control their movement through the game. Player should be able to enter any command at any time, and if it makes sense in the current context it will be carried out. +___YES__ 2 pts: Game has a **robust, understandable text-based interface** that allows the player to control their movement through the game. Player should be able to enter any command at any time, and if it makes sense in the current context it will be carried out. -_____ 2 pts: Submission includes a **cheat sheet** (`cheatsheet.md`) documenting all of the available commands, as well as a **description of the layout** of your game world's underlying physical layout; this can be described in words, or included as a separate image file if you prefer to sketch a map by hand. If your game includes **challenges** that must be overcome to win, also describe them here. +__YES___ 2 pts: Submission includes a **cheat sheet** (`cheatsheet.md`) documenting all of the available commands, as well as a **description of the layout** of your game world's underlying physical layout; this can be described in words, or included as a separate image file if you prefer to sketch a map by hand. If your game includes **challenges** that must be overcome to win, also describe them here. -_____ 2 pts: Storyline driving the game is **engaging**, and individual elements of play make sense within the context of the story. +___YES__ 2 pts: Storyline driving the game is **engaging**, and individual elements of play make sense within the context of the story. -_____ 2 pts: Game has **multiple possible paths / outcomes** (i.e. gameplay depends on player's choices and is not the same every time). +__YES___ 2 pts: Game has **multiple possible paths / outcomes** (i.e. gameplay depends on player's choices and is not the same every time). -_____ 1 pt: Gameplay supports **reversible moves** where reasonable (e.g., if you pick up an object, you should be able to put it back down again later, possibly in a different place; if you go north then you should be able to return to the previous location by going south unless something has blocked your return path). +___YES__ 1 pt: Gameplay supports **reversible moves** where reasonable (e.g., if you pick up an object, you should be able to put it back down again later, possibly in a different place; if you go north then you should be able to return to the previous location by going south unless something has blocked your return path). -_____ 1 pt: Some paths through the game have **restricted access** until the player has completed a task or acquired a specific item (i.e. a key to open a door, etc.). +___YES__ 1 pt: Some paths through the game have **restricted access** until the player has completed a task or acquired a specific item (i.e. a key to open a door, etc.). ## Back-End Design (10 pts) -_____ 2 pts: Selected classes(s) are **effective, efficient** at supporting the desired operations and program behavior. +___YES__ 2 pts: Selected classes(s) are **effective, efficient** at supporting the desired operations and program behavior. -_____ 2 pts: Design justification includes a discussion of at least one (reasonable) **alternative design** that could have been used, and the reasons why you decided against this alternative. +___YES__ 2 pts: Design justification includes a discussion of at least one (reasonable) **alternative design** that could have been used, and the reasons why you decided against this alternative. -_____ 2 pts: The project makes effective use of **Java built-in classes** whenever they are appropriate. +___YES__ 2 pts: The project makes effective use of **Java built-in classes** whenever they are appropriate. -_____ 2 pts: The project's design is **extensible** (i.e. someone else could pick up where you left off, adding on or modifying the game without requiring a total rewrite). +___YES__ 2 pts: The project's design is **extensible** (i.e. someone else could pick up where you left off, adding on or modifying the game without requiring a total rewrite). -_____ 2 pts: Submission includes an **architecture diagram** describing the relationships between all classes. +___YES__ 2 pts: Submission includes an **architecture diagram** describing the relationships between all classes. ## General Items (10 pts): -_____ 4 pts: Program compiles without errors or warnings. +___YES__ 4 pts: Program compiles without errors or warnings. -_____ 2 pts: Executes fully & consistently without crashing (exception/freeze). +___YES__ 2 pts: Executes fully & consistently without crashing (exception/freeze). -_____ 2 pt: Complies with style guidelines (missing items 1 pt each): +___YES__ 2 pt: Complies with style guidelines (missing items 1 pt each): - _____ Classes & class members all have Javadoc header comments. + __YES___ Classes & class members all have Javadoc header comments. - _____ Clear and consistent indentation of bracketed sections. + __YES___ Clear and consistent indentation of bracketed sections. - _____ Adheres to Java conventions on naming & capitalization. + ___YES__ Adheres to Java conventions on naming & capitalization. - _____ Methods & variables all have clear and accurate names. + ___YES__ Methods & variables all have clear and accurate names. - _____ Methods avoid confusing side effects. + ___YES__ Methods avoid confusing side effects. -_____ 1 pt: All required files included with submission (including completed checklist file). +___YES__ 1 pt: All required files included with submission (including completed checklist file). -_____ 1 pt: `readme.md` contains your reflection on the project and responses to all prompts . +___YES__ 1 pt: `readme.md` contains your reflection on the project and responses to all prompts .