@Override
    public final List<Successor> getSuccessors (final Object state) {
        final Point curPos = (Point) state;
        final ArrayList<Successor> result = new ArrayList<Successor>();
        for (char direct : DIRECT_MAP.keySet()) {
            // Get the new position by current position and direct
            final Point action = DIRECT_MAP.get(direct);
            final Point newPos = new Point(curPos);
            newPos.move(curPos.x + action.x, curPos.y + action.y);

            // Check whether the new position is out of bound of map.
            if (newPos.x >= 0 && newPos.x < map.length && newPos.y >= 0
                    && newPos.y < map[0].length) {
                // Should not go through the wall and closed lift
                if (map[newPos.x][newPos.y] != GameSimulation.WALL
                        && map[newPos.x][newPos.y] != GameSimulation.LIFT) {
                    // It's a valid new position, add it into result.
                    result.add(new Successor(newPos, action));
                }
            }
        }
        return result;
    }