/** 王 */

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;

public class king extends soldier implements horse {

	public king(int x, int y, int direction, int Nationality) {
		super(x,y, direction, Nationality);
	}
	public king(int x, int y, int direction, int Nationality, soldier target, boolean auto) {
		super(x,y, direction, Nationality, target, auto);
	}

	public void init() {
		HP = 100;
		offensivePower = 1;
		defensivePower = 5;

		presentSpeed = 0;
		maxSpeed = 4;
		acceleration = 2;
	}
	public void show(Graphics g, int x, int y, Component view) {
		UGE.show(g, x,y, this, view);
	}

	public boolean checkExistence() {
		if (HP > 0) {
			if (this == gameBoard.getUnit(x,y))
				return true;
			else
				return false;
		} else {
			if (this == gameBoard.getUnit(x,y)) {
				gameBoard.removeUnit(x,y);
				gameBoard.setDefeatedKing(this);	// ゲームボードに対して、自分が討死したことを通知。
			}

			return false;
		}
	
	}
}

