From 1d3188cb53e05ec8074c766b696eec2fa1636c8a Mon Sep 17 00:00:00 2001 From: Luca Carnegie <41924665+lcarnegie@users.noreply.github.com> Date: Mon, 27 May 2019 22:54:35 -0400 Subject: [PATCH] made a riddle class --- data/enemies.dat | 2 +- src/com/bayviewglen/zork/Game.java | 6 +++--- src/com/bayviewglen/zork/Items/Riddle.java | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 src/com/bayviewglen/zork/Items/Riddle.java diff --git a/data/enemies.dat b/data/enemies.dat index 7e46975..96bd145 100644 --- a/data/enemies.dat +++ b/data/enemies.dat @@ -1,4 +1,4 @@ -Enemy Name: HenryPellatt +Enemy Name: Henry_Pellatt Description: The owner of the Castle Starting Room: Circle Room Damage Given: 25 \ No newline at end of file diff --git a/src/com/bayviewglen/zork/Game.java b/src/com/bayviewglen/zork/Game.java index b3fdbb9..f8b6850 100644 --- a/src/com/bayviewglen/zork/Game.java +++ b/src/com/bayviewglen/zork/Game.java @@ -169,9 +169,9 @@ class Game { while(isNotValid) { System.out.print("> "); String i = in.nextLine(); - if(i.toLowerCase().equals("play")) { + if(i.toLowerCase().equals("play") || i.toLowerCase().equals("p")) { return true; - }else if(i.toLowerCase().equals("quit")) { + }else if(i.toLowerCase().equals("quit") || i.toLowerCase().equals("q")) { in.close(); return false; } @@ -191,7 +191,7 @@ class Game { // Enter the main command loop. Here we repeatedly read commands and // execute them until the game is over. System.out.println("\nType 'help' if you need help, consult the wiki \non GitHub if you are confused and enjoy the game!\n"); - System.out.println("\n\nEscape Casa Loma: A text-based adventure game"); + System.out.println("\n\nEscape Casa Loma"); System.out.println("---------------------\n"); System.out.print(currentRoom.longDescription()); System.out.println(currentRoom.exitString()); diff --git a/src/com/bayviewglen/zork/Items/Riddle.java b/src/com/bayviewglen/zork/Items/Riddle.java new file mode 100644 index 0000000..5f50e02 --- /dev/null +++ b/src/com/bayviewglen/zork/Items/Riddle.java @@ -0,0 +1,5 @@ +package com.bayviewglen.zork.Items; + +public class Riddle { + +}