public AttackResult attack(Territory target){
		//assumes that troop strength of attacking territory is > 1
		Integer[] aDice, dDice;

		if(this.troopStrength > 3){
			aDice = new Integer[3];
		} else{
			aDice = new Integer[this.troopStrength - 1];
		}

		if(target.getTroopStrength() > 1){
			dDice = new Integer[2];
		} else {
			dDice = new Integer[1];
		}
		System.out.println("Attack dice");
		for(int i = 0; i < aDice.length; i++){
			aDice[i] = Util.diceRoll();
		}
		System.out.println("Defense Dice");
		for(int i = 0; i < dDice.length; i++){
			dDice[i] = Util.diceRoll();
		}
		System.out.println("Attacking Dice: " + aDice.toString());
		System.out.println("Defending Dice: " + dDice.toString());
		
		AttackResult res = new AttackResult(aDice,dDice);
		System.out.println(aDice.length);
		System.out.println(dDice.length);
		this.troopStrength -= res.getAttackerLosses();
		target.troopStrength -= res.getDefenderLosses();
		
		if(target.troopStrength <= 0){
			target.troopStrength = 0;
			target.setOwnedBy(this.ownedBy);
			do {
				try{
					target.setTroopStrength(Integer.valueOf((String) JOptionPane.showInputDialog(Graphics.frame, "How many reinforcements would you like to send?", "Reinforcements", JOptionPane.PLAIN_MESSAGE, null, null, null)));
				}catch (java.lang.NumberFormatException e){
					JOptionPane.showMessageDialog(null, "You must enter a valid integer response");
				}
			} while (target.getTroopStrength() < 1 || target.getTroopStrength() > this.troopStrength);
			this.setTroopStrength(this.getTroopStrength() - target.getTroopStrength());
		}
		
		this.troopCount.setText(Integer.valueOf(this.troopStrength).toString());
		target.troopCount.setText(Integer.valueOf(target.troopStrength).toString());
		
		return res;
	}