This commit is contained in:
2025-02-18 13:53:59 +01:00
parent e64a127c34
commit a7344d4543
3 changed files with 23 additions and 2 deletions

View File

@@ -145,6 +145,9 @@ public class Game
else if (commandWord.equals("quit")) {
wantToQuit = quit(command);
}
else if (commandWord.equals("look")) {
look(currentRoom);
}
return wantToQuit;
}
@@ -162,7 +165,7 @@ public class Game
System.out.println("through the jungle. At once there is a glade. On it there a buildings...");
System.out.println();
System.out.println("Your command words are:");
System.out.println(" go quit help");
System.out.println(parser.showCommands());
}
/**
@@ -213,4 +216,8 @@ public class Game
System.out.print(currentRoom.getLongDescription());
System.out.println();
}
private void look(Room currentRoom)
{
System.out.println(currentRoom.getLongDescription());
}
}