/** * change Direction of all enemies presents in the game * * @param alien : alien which touch the well * @param nextGoal : the nextGoal for the MoveStrategy */ private void enemyChangeDirection(Alien alien, int nextGoal) { ((Level) alien.getLevel()).getEnemiesArray().ReverseMoveStrategyForAll(nextGoal); }
/** * rule when en enemy touch the player * * @param player * @param alien * @throws IllegalMoveException */ public void moveBlockerRule(Player player, Alien alien) throws IllegalMoveException { alien.getLevel().end(); throw new IllegalMoveException(); }