Break my heart
parent
33feedc3b1
commit
c8e301f9cc
|
@ -65,7 +65,7 @@ public class GameEngine<T> implements Runnable {
|
||||||
|
|
||||||
for (Building b : map.contains)
|
for (Building b : map.contains)
|
||||||
buildingPrinter.addRow(new Print.Row(b.getClass().getSimpleName(),
|
buildingPrinter.addRow(new Print.Row(b.getClass().getSimpleName(),
|
||||||
Integer.toString(b.getLevel()),
|
Integer.toString(b.getLevel() + 1),
|
||||||
Integer.toString(b.getHealth())));
|
Integer.toString(b.getHealth())));
|
||||||
|
|
||||||
Print.print(buildingPrinter.createTable(true, false, true));
|
Print.print(buildingPrinter.createTable(true, false, true));
|
||||||
|
@ -204,7 +204,8 @@ public class GameEngine<T> implements Runnable {
|
||||||
System.err.println("Args are not a valid building!");
|
System.err.println("Args are not a valid building!");
|
||||||
else if (this.map.build(new Tile(), type) ) {
|
else if (this.map.build(new Tile(), type) ) {
|
||||||
System.out.println(type.getClass().getSimpleName()+" successfully built\n");
|
System.out.println(type.getClass().getSimpleName()+" successfully built\n");
|
||||||
} else System.out.println("Missing resources to build "+type.getClass().getSimpleName());
|
} else
|
||||||
|
System.out.println("Missing resources to build "+type.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
|
@ -219,6 +220,10 @@ public class GameEngine<T> implements Runnable {
|
||||||
} else System.out.println("Missing gold to train "+type.getClass().getSimpleName());
|
} else System.out.println("Missing gold to train "+type.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case '3':
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
break;
|
||||||
case '5':
|
case '5':
|
||||||
printState(this.map,"Home Village");
|
printState(this.map,"Home Village");
|
||||||
break;
|
break;
|
||||||
|
@ -230,7 +235,7 @@ public class GameEngine<T> implements Runnable {
|
||||||
}
|
}
|
||||||
printMenuOptions();
|
printMenuOptions();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,8 @@ public class Map {
|
||||||
throw new RuntimeException("Unable to subtract wood despite valid check!");
|
throw new RuntimeException("Unable to subtract wood despite valid check!");
|
||||||
contains.add(b);
|
contains.add(b);
|
||||||
return true;
|
return true;
|
||||||
} else return false;
|
} else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean train(Inhabitant i) {
|
public boolean train(Inhabitant i) {
|
||||||
|
|
Loading…
Reference in New Issue