// Path: src/main/java/cbskarmory/Player.java
// public class Player {
// 
//     public static int numberOfPlayers;
//     public final CO CO;
//     public final int id;
//     private ArrayList<Unit> unitsControlled;
//     private int money;
//     private ArrayList<Property> propertiesOwned;
//     private int commTowers;
//     private Color teamColor;
// 
//     /**
//      * Constructs a Player
//      *
//      * @param startingMoney starting amount of money
//      * @param teamColor     team color to be assigned to this Player
//      */
//     public Player(CO commandingOfficer, int startingMoney, Color teamColor) {
//         //if error when setting starting funds, set to 0
//         if (setMoney(startingMoney) == -1) {
//             setMoney(0);
//         } else {
//             setMoney(startingMoney);
//         }
//         this.id = ++Player.numberOfPlayers;
//         this.CO = commandingOfficer;
//         this.teamColor = teamColor;
//         this.unitsControlled = new ArrayList<>();
//         this.propertiesOwned = new ArrayList<>();
//     }
// 
//     /**
//      * @return the player's team color
//      */
//     public Color getTeamColor() {
//         return this.teamColor;
//     }
// 
//     /**
//      * @return the amount of money this player has
//      */
//     public int getMoney() {
//         return this.money;
//     }
// 
//     /**
//      * @param money a positive integer to set money to
//      * @return the amount of money that this player has after execution
//      * or  -1 if the amount was invalid
//      */
//     public int setMoney(int money) {
//         if (money >= 0) {
//             this.money = money;
//             return this.money;
//         } else {
//             return -1;
//         }
//     }
// 
//     /**
//      * @return a list of all of the units that this player controls
//      */
//     public ArrayList<Unit> getUnitsControlled() {
//         return unitsControlled;
//     }
// 
//     /**
//      * @return the number of Units that this player controls
//      */
//     public int getNumUnitControlled() {
//         return getUnitsControlled().size();
//     }
// 
//     /**
//      * @return a list of all of the Properties that this player owns
//      */
//     public ArrayList<Property> getPropertiesOwned() {
//         return this.propertiesOwned;
//     }
// 
//     /**
//      * @return the number of Properties that this player controls
//      */
//     public int getNumPropertiesOwned() {
//         return getPropertiesOwned().size();
//     }
// 
//     public int getCommTowers() {
//         return commTowers;
//     }
// 
//     public void setCommTowers(int commTowers) {
//         this.commTowers = commTowers;
//     }
// 
//     public boolean hasHQ() {
//         for (Property prop : getPropertiesOwned()) {
//             if (prop instanceof HQ) {
//                 return true;
//             }
//         }
//         return false;
//     }
// }
// 
// Path: src/main/java/cbskarmory/PassiveFlag.java
// public enum MoveType {
//     FOOT,
//     TIRES,
//     TREADS,
//     SEA,
//     AIR,
//     LANDER
// }


import cbskarmory.Player;
import cbskarmory.PassiveFlag.MoveType;
/*
 * Copyright(c) 2017 CBSkarmory (https://github.com/CBSkarmory)
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * @author CBSkarmory
 */

package cbskarmory.units;


/**
 * abstract Air represents all air units
 * Air units use some fuel every day to stay in flight and will crash without fuel.
 * These get MoveType.AIR
 * Air units traverse all Terrains for 1 mobility
 */
public abstract class Air extends Unit {

    /**
     * calls super(Player) from child classes
     * don't invoke this
     *
     * @param owner owner of unit
     */
    public Air(Player owner) {
        super(owner);
    }

    @Override
    public void outOfFuel() {
        //TODO crash animation
        this.selfDestruct(true);
    }

    @Override
// Path: src/main/java/cbskarmory/Player.java
// public class Player {
// 
//     public static int numberOfPlayers;
//     public final CO CO;
//     public final int id;
//     private ArrayList<Unit> unitsControlled;
//     private int money;
//     private ArrayList<Property> propertiesOwned;
//     private int commTowers;
//     private Color teamColor;
// 
//     /**
//      * Constructs a Player
//      *
//      * @param startingMoney starting amount of money
//      * @param teamColor     team color to be assigned to this Player
//      */
//     public Player(CO commandingOfficer, int startingMoney, Color teamColor) {
//         //if error when setting starting funds, set to 0
//         if (setMoney(startingMoney) == -1) {
//             setMoney(0);
//         } else {
//             setMoney(startingMoney);
//         }
//         this.id = ++Player.numberOfPlayers;
//         this.CO = commandingOfficer;
//         this.teamColor = teamColor;
//         this.unitsControlled = new ArrayList<>();
//         this.propertiesOwned = new ArrayList<>();
//     }
// 
//     /**
//      * @return the player's team color
//      */
//     public Color getTeamColor() {
//         return this.teamColor;
//     }
// 
//     /**
//      * @return the amount of money this player has
//      */
//     public int getMoney() {
//         return this.money;
//     }
// 
//     /**
//      * @param money a positive integer to set money to
//      * @return the amount of money that this player has after execution
//      * or  -1 if the amount was invalid
//      */
//     public int setMoney(int money) {
//         if (money >= 0) {
//             this.money = money;
//             return this.money;
//         } else {
//             return -1;
//         }
//     }
// 
//     /**
//      * @return a list of all of the units that this player controls
//      */
//     public ArrayList<Unit> getUnitsControlled() {
//         return unitsControlled;
//     }
// 
//     /**
//      * @return the number of Units that this player controls
//      */
//     public int getNumUnitControlled() {
//         return getUnitsControlled().size();
//     }
// 
//     /**
//      * @return a list of all of the Properties that this player owns
//      */
//     public ArrayList<Property> getPropertiesOwned() {
//         return this.propertiesOwned;
//     }
// 
//     /**
//      * @return the number of Properties that this player controls
//      */
//     public int getNumPropertiesOwned() {
//         return getPropertiesOwned().size();
//     }
// 
//     public int getCommTowers() {
//         return commTowers;
//     }
// 
//     public void setCommTowers(int commTowers) {
//         this.commTowers = commTowers;
//     }
// 
//     public boolean hasHQ() {
//         for (Property prop : getPropertiesOwned()) {
//             if (prop instanceof HQ) {
//                 return true;
//             }
//         }
//         return false;
//     }
// }
// 
// Path: src/main/java/cbskarmory/PassiveFlag.java
// public enum MoveType {
//     FOOT,
//     TIRES,
//     TREADS,
//     SEA,
//     AIR,
//     LANDER
// }


// Path: src/main/java/cbskarmory/units/Air.java
import cbskarmory.Player;
import cbskarmory.PassiveFlag.MoveType;

/*
 * Copyright(c) 2017 CBSkarmory (https://github.com/CBSkarmory)
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * @author CBSkarmory
 */

package cbskarmory.units;


/**
 * abstract Air represents all air units
 * Air units use some fuel every day to stay in flight and will crash without fuel.
 * These get MoveType.AIR
 * Air units traverse all Terrains for 1 mobility
 */
public abstract class Air extends Unit {

    /**
     * calls super(Player) from child classes
     * don't invoke this
     *
     * @param owner owner of unit
     */
    public Air(Player owner) {
        super(owner);
    }

    @Override
    public void outOfFuel() {
        //TODO crash animation
        this.selfDestruct(true);
    }

    @Override
    public MoveType getMovementType() {