
public class Tank {

	protected void tankMalen() {
		switch (objectType) {
		case 00:
			tankManager.maler.drawImage("base", x_Koordinate, y_Koordinate);
			break;
		case 01:
			tankManager.maler.drawImage("gh", x_Koordinate - tankManager.koernigkeit2 * 2,
					y_Koordinate - tankManager.koernigkeit2 * 2);
			drawTanks("01");
			break;
		case 02:
			tankManager.maler.drawImage("gh", x_Koordinate - tankManager.koernigkeit2 * 2,
					y_Koordinate - tankManager.koernigkeit2 * 2);
			drawTanks("02");
			break;
		case 03:
			tankManager.maler.drawImage("gh", x_Koordinate - tankManager.koernigkeit2 * 2,
					y_Koordinate - tankManager.koernigkeit2 * 2);
			drawTanks("03");
			break;
		case 11:
			drawTanks("11");
			break;
		case 12:
			drawTanks("12");
			break;
		case 13:
			drawTanks("13");
			break;
		case 21:
			if (this.energie >= 30)
				drawTanks("21");
			else if (this.energie >= 20 && this.energie < 30)
				drawTanks("24");
			else if (this.energie >= 10 && this.energie < 20)
				drawTanks("25");
			break;
		case 22:
			if (this.energie >= 30)
				drawTanks("22");
			else if (this.energie >= 20 && this.energie < 30)
				drawTanks("26");
			else if (this.energie >= 10 && this.energie < 20)
				drawTanks("27");
			break;
		case 23:
			if (this.energie >= 30)
				drawTanks("23");
			else if (this.energie >= 20 && this.energie < 30)
				drawTanks("28");
			else if (this.energie >= 10 && this.energie < 20)
				drawTanks("29");
			break;
		}

	}

	private void drawTanks(String tankTypes) {

		switch (this.fahrRichtung) {
		case 1:
			tankManager.maler.drawImage(tankTypes + "U", x_Koordinate, y_Koordinate);
			break;
		case 3:
			tankManager.maler.drawImage(tankTypes + "R", x_Koordinate, y_Koordinate);
			break;
		case 5:
			tankManager.maler.drawImage(tankTypes + "D", x_Koordinate, y_Koordinate);
			break;
		case 7:
			tankManager.maler.drawImage(tankTypes + "L", x_Koordinate, y_Koordinate);
			break;
		}

	}

}