Modified prototype view class 'GameDisplay'
parent
9325ab21ad
commit
fdb6a98b13
|
@ -146,7 +146,6 @@ public class GameEngine<T> implements Runnable {
|
|||
view.printVillageState(this.map,"Current Village State");
|
||||
view.printGameMenu();
|
||||
|
||||
System.out.println();
|
||||
Map exploringMap = null;
|
||||
boolean deleteMyHeart = true;
|
||||
while (running) {
|
||||
|
@ -158,8 +157,8 @@ public class GameEngine<T> implements Runnable {
|
|||
try {
|
||||
if ((in = view.nextInput()) != null) {
|
||||
String[] args = in.split(" ");
|
||||
System.out.println("Your Input: ");
|
||||
System.out.println("\t->" + in + '\n');
|
||||
|
||||
view.printLastInput();
|
||||
// reset the map if they aren't exploring
|
||||
if (in.charAt(0) != '4')
|
||||
deleteMyHeart = true;
|
||||
|
|
|
@ -22,10 +22,15 @@ public class GameDisplay {
|
|||
|
||||
public String nextInput() throws IOException {
|
||||
if (reader.ready()) {
|
||||
return scanner.nextLine();
|
||||
return (input = scanner.nextLine());
|
||||
} else return null;
|
||||
}
|
||||
|
||||
public void printLastInput() {
|
||||
System.out.println("\nYour Input: ");
|
||||
System.out.println("\t->" + input + '\n');
|
||||
}
|
||||
|
||||
public void printVillageState(Map map, String displayName) {
|
||||
Print resourcesPrinter = new Print(displayName, 2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue