import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class NapCity extends Structure implements RunnableUnit {

	public NapCity(int x, int y, Board board) {
		this.x = x;
		this.y = y;
		this.board = board;

		init();
	}

	public void init() {
		hp = 100;
		this.nationality = 0;
	}

	public void run () {
		 increaseSoldier();
	}

	public void show(Graphics g, int x, int y, Component view) {
		uge.show(g, x,y, this, view);
	}

	/** この建築物を通過するには、どのくらいの移動力を消費するか。 */
	public int getRestraint() {

		return 1;

	}

	/** この都市に駐留している軍隊の兵士をふやすメソッド */
	public void increaseSoldier() {
		Army stayArmy = (Army)board.getCreature(x, y);

		if (stayArmy != null) {
			stayArmy.setNumberOfSoldier( stayArmy.getNumberOfSoldier() + 10 );
		}
	}
}
