/** * @param gameFile * @throws TegRequestException */ @Test public void testCountriesOk() throws TegRequestException { int reqNum = 0; Iterator<PlayerRequest> it = _save.iterator(_g); while (it.hasNext()) { PlayerRequest req = it.next(); if (_g.getState().atLeast(GameState.FIRST_PUT)) { for (Country c : _g.getBoard().getCountries()) { if (_g.getOwner(c) == null || _g.getArmies(c) < 1) Assert.fail( "#" + reqNum + ".Country " + c.getName() + " is owned by " + (_g.getOwner(c)) + " with armies " + _g.getArmies(c) + " at req " + req); } } req.perform(_g); reqNum++; } }
private void printBoard(TegGame g) { for (Country c : g.getBoard().getCountries()) { System.out.println(c.getName() + "|" + (g.getOwner(c)) + "|" + g.getArmies(c)); } }