import java.util.*;
/**
 * MilitaryUnit class
 */
public class MilitaryUnit extends Unit {
    protected int spacecombat;
    protected boolean isMobile;
    protected Charactr leader;
    protected Vector charactrs=new Vector();
    /**
     * Constructor Methods
     */
    public MilitaryUnit(char s, String n, int com, int scom, Environ env, boolean m)
    {
	//super();
	//	new Unit(s,n,com,scom,env);
	side = s;
	name = n;
	combat = com;
	spacecombat = scom;
	environ = env;
	isMobile = m;
	isChar = false;
	groupType = 'm';
	unitType = 'm';
	leader = null;
	orbit = null;
    }
   /**
    * accessor methods
    */
   /**
    * getIsMobile()
    * returns true if the MilitaryUnit is mobile; false otherwise
    */
    public boolean getIsMobile()
    {
	return isMobile;
    }
   /**
    * getSpacecombat()
    * returns the spacecombat ability (int) of the unit
    */
    public int getSpacecombat()
    {
	return spacecombat;
    }
   /**
    * getLeader()
    * returns the leader of the military unit
    */
    public Charactr getLeader(){
	return leader;
    }
    /**add Character()
     *adds a character to the Military Unit
     */
    public void addCharacter(Charactr c)
    {
	charactrs.add(c);
    }
    /**remove Character()
     *removes a character from the Military Unit
     */
    public void removeCharacter(Charactr c)
    {
	charactrs.remove(c);
    }


    //returns number of characters in
    //military unit
    public int getNumChar()
    {
	return charactrs.size();
    }

   /**
    * setLeader()
    * changes the leader of the military unit
    */
    public void setLeader(Charactr lead){
	leader = lead;
    }
}
