Package civquest.nation

Examples of civquest.nation.Nation


          && cityReader.getCityID(field.getPosition()) != null) {
          Messages messages = Messages.getMessages();
          messages.info("ConstructTestCityAction", "CityAR",
                  "You can't build more than one city on a field!");
        } else {
          Nation activeNation = Game.getGame().getActiveNation();
          if (activeNation != null) {
            ConstructCity newCityChange
              = new ConstructCity(field.getPosition(),
                        Game.getGame().getActiveNation());
            newCityChange.execute();
View Full Code Here


     * the active nation.
     */
    public void actionPerformed(FunctionActionEvent e) {
        if (this.scenarioEditor.getSelectedTab() == UNIT_TAB) {
            //only proceed if the unitTab is selected
            Nation nation = this.scenarioEditor.getSelectedNation();
            Coordinate coordinate = this.map.getWorkingFieldPos();
            if (coordinate != null) {
                ConstructCity newCityChange = new ConstructCity(
                        coordinate, nation);
                newCityChange.execute();
View Full Code Here

  }

  public void execute() throws RulesetException {
    notifyBefore();

    Nation nation = new Nation(name, Government.DESPOTISM,
                   nationRegistry, visRegistry);
    Game.getGame().add(nation);

    addNationID(nation.getID());
    this.newNationID = nation.getID();

    notifyAfter();
  }
View Full Code Here

  public FieldResourceProductionMapping(Game game) throws GameChangeException {
    this.game = game;

    Iterator<Nation> nationIterator = game.getNationIterator();
    while (nationIterator.hasNext()) {
      Nation nation = nationIterator.next();
      processAddNation(nation);
    }

    this.id = game.getNewID();
View Full Code Here

    Game game = Game.getGame();
        Messages messages = Messages.getMessages();
        MapData mapData = Game.getMapData();
        Field field = mapData.getField(location);
        Nation nation = game.getNation(owner);

        Iterator<Unit> unitsIt = field.getUnitIterator();
        if (unitsIt.hasNext()) {
            Unit unit = unitsIt.next();
            if (!unit.getOwner().equals(nation)) {
View Full Code Here

  }

  private void searchNextToReturn() {
    while (iterator.hasNext()) {
      nextToReturn = iterator.next();
      Nation currOwner = nextToReturn.getOwner();
      if (currOwner != null && searchedNations.contains(currOwner.getID())) {
        return;
      }
    }
    nextToReturn = null;
  }
View Full Code Here

    // as long as we only listen with "ALL_NATIONS", this method is not relevant
    return new RestrictedToNation[] {};
  }

  public void afterGameChanged(SetDisplayNation change) {
    Nation nation = Game.getGame().getNation(change.getNationID());
    setDisplayNation(nation);
  }
View Full Code Here

      // Nation --> Player controlling the nation.
      Game game = Game.getGame();
      nations = new HashMap<Long, Nation>();
       Set<Long> nationIDs = loadedData.getLongHashSet("nations");
      for (Long currID : nationIDs) {
        Nation currNation = game.getNation(currID);
        nations.put(currID, currNation);
        currNation.setPlayer(this);
      }
    }
  } 
View Full Code Here

    addNation1.execute();

    AddNation addNation2 = new AddNation("Michaelians", nationRegistry, visRegistry);
    addNation2.execute();
   
        Nation nation1 = Game.getGame().getNation(addNation1.getNewNationID());
        Nation nation2 = Game.getGame().getNation(addNation2.getNewNationID());

    addACity(nation1);
    addACity(nation2);

        Player player1 = new Player("John Doe");
View Full Code Here

    int x = 0;
    int y = 15;
   
    Game game = Game.getGame();
    int turn = game.getTurn();
    Nation activeNation = game.getActiveNation();
    Nation currNation = (gameData == null ? null : gameData.getNation());

    Text text = new Text(g, 5, 15);
    text.write("Turn: " + turn + INFORMATION_SEPARATOR);

    if (activeNation == null) {
View Full Code Here

TOP

Related Classes of civquest.nation.Nation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.