Package civquest.group.gameChange

Examples of civquest.group.gameChange.MarkUnit


        }
        if (this.units.size() == 1) {
            //one unit
            if (!additionally || markedUnitsOnField.isEmpty()) {
                //mark unit
                MarkUnit markUnit = new MarkUnit(group, this.units.get(0));
                markUnit.execute();
            } else if (additionally) {
                //unmark unit
                UnmarkUnit unmarkUnit = new UnmarkUnit(group, this.units.get(0));
                unmarkUnit.execute();
            }
            return;
        }

        //show dialog for selection of units
        MarkDialog markDialog = new MarkDialog(prevMarked, prevNotMarked);
       
        List<Long> markedList = markDialog.getMarkedUnitIDs();
        if (additionally) {
            //remove units that were marked before
            markedList.removeAll(prevMarked);
        }
        Long[] marked = new Long[markedList.size()];
        for (int i = 0; i < marked.length; i++) {
            marked[i] = markedList.get(i);
        }

        if (marked.length > 0) {
            MarkUnit markUnit = new MarkUnit(group, marked);
            markUnit.execute();
        }
        if (additionally) {
            List<Long> notMarkedList = markDialog.getNotMarkedUnitIDs();
            //remove units that were not marked before
            notMarkedList.removeAll(prevNotMarked);
View Full Code Here


       
        UnmarkAllUnits unmarkAllUnits = new UnmarkAllUnits(group,
                                   quadMap.getGameData());
        unmarkAllUnits.execute();
     
        MarkUnit markUnit = new MarkUnit(group, units.get(0));
        markUnit.execute();
      } else {
        Messages.getMessages().info("QuadIsoLayUnitView", "QMapWarn",
                      "When executing mark-only-top-unit: QuadMap has "
                      + "no game-data");
      }
View Full Code Here

  /** Implementation of function mark-additionally-top-unit */
  private void markAdditionallyTopUnit() {
    if (units.size() > 0) {
      Group group = quadMap.getActiveGroup();

      MarkUnit markUnit = new MarkUnit(group, units.get(0));
      markUnit.execute();
    }
    }
View Full Code Here

TOP

Related Classes of civquest.group.gameChange.MarkUnit

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.