Package civquest.group.gameChange

Examples of civquest.group.gameChange.UnmarkUnit


                //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);
            Long[] notMarked = new Long[notMarkedList.size()];
            for (int i = 0; i < notMarked.length; i++) {
                notMarked[i] = notMarkedList.get(i);
            }
            //unmark units
            UnmarkUnit unmarkUnit = new UnmarkUnit(group, notMarked);
            unmarkUnit.execute();
        }
    }
View Full Code Here

TOP

Related Classes of civquest.group.gameChange.UnmarkUnit

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.