Пример #1
0
 public void update(Game game, City city) {
   cityName.setText(city.getName());
   gold.setNumber(game.getMoney().getAmount());
   population.setNumber(city.getTotalPopulation());
   population.setCeiling(CityStats.totalHouseCapacity(city));
   year.setNumber(game.getYear());
 }
Пример #2
0
 public void build(String constructibleName, Position position) {
   try {
     game.build(position, game.getScenario().getMod().constructible(constructibleName));
   } catch (BuildingNotFoundException e) {
     e.printStackTrace();
   }
 }
Пример #3
0
 public void buildOnSelectedPosition(String constructibleName) {
   build(constructibleName, game.getSelectedPosition());
 }
Пример #4
0
 public void destruct(Position position) {
   game.destruct(position);
 }
Пример #5
0
 public void destructSelectedPosition() {
   destruct(game.getSelectedPosition());
 }
Пример #6
0
 public void upgrade(Position position) {
   game.upgrade(position);
 }
Пример #7
0
 public void upgradeSelectedPosition() {
   upgrade(game.getSelectedPosition());
 }
Пример #8
0
 public void nextYear() {
   game.nextYear();
 }
Пример #9
0
 public void select(Position newPosition) {
   // TODO : check if the new pos is correct
   game.setSelectedPosition(newPosition);
 }
Пример #10
0
 private void addYearCounter(Game game) {
   year = new Counter("Year", game.getYear());
   add(year);
 }
Пример #11
0
 private void addGoldCounter(Game game) {
   gold = new Counter("Gold", game.getMoney().getAmount());
   add(gold);
 }