private Action getAction(SpaceShip s) {
        Action a;
        switch (random.nextInt(3)) {
            case 0:
                a = new Action(MOVE_TO_EMPTY_PLANET);
                List<Planet> pl = getEmptyPlanets();
                if (pl.size() == 0)
                    break;
                a.target = pl.get(random.nextInt(pl.size()));
                return a;
            case 1:
                a = new Action(Action.actions.MOVE_TO_ENEMY_PLANET);
                pl = getEnemyPlanets();
                if (pl.size() == 0)
                    break;
                a.target = pl.get(random.nextInt(pl.size()));
                return a;
            case 2:
                a = new Action(Action.actions.MOVE_TO_ENEMY_SHIP);
                List<SpaceShip> sl = getEnemyShips();
                if (sl.size() == 0)
                    break;
                a.target = sl.get(random.nextInt(sl.size()));
                return a;
            case 3:
                a = new Action(Action.actions.STAY);
                return a;
        }
        a = new Action(Action.actions.STAY);
        return a;
    }