//TD9

public class Position {
	private int x;
	private int y;
	
	public void setX(int x){
		this.x = x;
	}
	public int getX(){
		return x;
	}
	public void setY(int y){
		this.y = y;
	}
	public int getY(){
		return y;
	}
}

public class Weapon{}

public class Engin {
	private string name;
	private int power;
	private Pilot[] pilotes = new Pilot[10];
	private Position position;
	private Weapon[] arme = new Weapon[1];
	private string appartient;
	
	public void setName(string newName){
		this.name = newName;
	}
	public string getName(){
		return name;
	}
	public void setPower(int power){
		this.power = power;
	}
	public int getPower(){
		return power;
	}
	public void setPilot(Pilot[] pilote){
		this.pilotes = pilote;
	}
	public Pilot[] getPilot(){
		return pilot;
	}
	public void move(int x, int y){
		this.position.setX = x;
		this.position.setY = y;
	}
	public void setArme(Weapon[] arme){
		this.arme = arme;
	}
	public Weapon[] getArme(){
		return arme;
	}
	public void addWeapon(Weapon arme){
		this.arme.add(arme);
	}
	public void attack(){}
}

public class Spatial extends Engin{}

public class Pilot {
	private string name;
	public void setPilot(string pilot){
		this.name=pilot;
	}
}

public class Armada {
	private Engin[] armadaEngin = newEngin[1];
	private Position position;
	private Engine[] engines;
	public void attack(){}
	public void addEngin(Engin e){
		this.armadaEngin.add(e);
	}
	public boolean moveTo(position target){
		this.position = target;
		for (Engine e : engines){
			e.move(target.getX(), target.getY());
		}
		return true;
	}
}
public class Army {
	private Armada armadas; 
	public void setArmada(Armada[] armada){
		this.armadas = armada;
	}
}

public class Strategy {
	private Army army;
	public void attackByForce(position target){
		Armada[] armadas = army.getAvailableArmada();
		for (Armada a : armadas){
			boolean arrived = a.moveTo(target);
			if(arrived){
				a.attack();
		}
	}
}
