public void updateEnemy() {
		boolean left = false;
		boolean right = false;
		boolean turnLeft = false;
		boolean turnRight = false;
		boolean turnDown = false;

		for (int i = 0; i < enemies_col_size && left == false; i++) {
			for (int j = 0; j < enemies_row_size && left == false; j++) {

				if (enemies[i][j] != null) {
					leftEndEnemy = i;
					rowLeftEndEnemy = j;
					left = true;
				}
			}
		}

		for (int i = enemies_col_size - 1; i >= 0 && right == false; i--) {
			for (int j = 0; j < enemies_row_size && right == false; j++) {

				if (enemies[i][j] != null) {

					rightEndEnemy = i;
					rowRightEndEnemy = j;
					right = true;

				}
			}
		}

		if (down) {

			yTempDown = (int) enemies[leftEndEnemy][rowLeftEndEnemy].getY()
					- enemies[leftEndEnemy][rowLeftEndEnemy].getHeight() / 2;
			if ((yTempDown - yOldDown) >= enemies[leftEndEnemy][rowLeftEndEnemy]
					.getHeight()) {
				if ((enemies[leftEndEnemy][rowLeftEndEnemy].getX() - enemies[leftEndEnemy][rowLeftEndEnemy]
						.getWidth() / 2) <= 0) {
					turnRight = true;
					down = false;
				}

				if ((enemies[rightEndEnemy][rowRightEndEnemy].getX() + enemies[rightEndEnemy][rowRightEndEnemy]
						.getWidth() / 2) >= GamePanel.DEFAULT_WIDTH) {
					turnLeft = true;
					down = false;
				}
			} else {
				turnDown = true;
			}
		} else {
			if ((enemies[leftEndEnemy][rowLeftEndEnemy].getX() - enemies[leftEndEnemy][rowLeftEndEnemy]
					.getWidth() / 2) <= 0) {
				turnRight = false;
				turnLeft = false;
				turnDown = true;
				down = true;
				yOldDown = (int) (enemies[leftEndEnemy][rowLeftEndEnemy].getY() - enemies[leftEndEnemy][rowLeftEndEnemy]
						.getHeight() / 2);
			}

			if ((enemies[rightEndEnemy][rowRightEndEnemy].getX() + enemies[rightEndEnemy][rowRightEndEnemy]
					.getWidth() / 2) >= GamePanel.DEFAULT_WIDTH) {
				turnRight = false;
				turnLeft = false;
				turnDown = true;

				yOldDown = (int) (enemies[leftEndEnemy][rowLeftEndEnemy].getY() - enemies[leftEndEnemy][rowLeftEndEnemy]
						.getHeight() / 2);
				down = true;
			}
		}

		for (int j = 0; j < enemies_row_size; j++) {
			for (int i = 0; i < enemies_col_size; i++) {

				if (enemies[i][j] != null) {
					if (enemies[i][j].remove) {

						enemies_size--;
						Score.instance.addScore(enemies[i][j].getScoreEnemy());
						boolean first = false;
						for (int k = j - 1; k >= 0 && !first; k--) {
							if (enemies[i][k] != null) {
								enemies[i][k].setFirst();
								first = true;
							}
						}

						enemies[i][j] = null;

					} else {
						if (turnLeft) {
							enemies[i][j].setLeft(true);
						}
						if (turnRight) {
							enemies[i][j].setRight(true);
						}
						if (turnDown) {
							enemies[i][j].setDown(true);
						}

						enemies[i][j].update();
						enemies[i][j].checkAttack(player);

					}

				}
			}
		}
	}