src/main/java/cursor/rybak/game/MazeSetUp.java
/**
     * Initialize maze and all locations in it
     *
     * @param team     team
     * @param gameMode game mode
     * @return start location
     */
Initialize maze and all locations in it
@param team     team
@param gameMode game mode
@return start location
Initialize maze and all locations in it @param team team @param gameMode game mode @return start location
public static Location enterToMaze(Team team, String gameMode, Guide guide) {
        AbstractMaze maze;
        Map<String, Location> mazeMap;
        do {
            maze = new Maze(Mode.valueOf(gameMode).getWidth(), Mode.valueOf(gameMode).getHeight());
            mazeMap = generateGameLocations(maze);
        } while (mazeMap.size() < MIN_PATHS);
        putObjective(maze, mazeMap);
        putEnemies(maze, mazeMap, gameMode);
        guide.setPlayground(maze);
        return initStartLocation(mazeMap, maze, team);
    }
public static Location enterToMaze ( Team team , String gameMode , Guide guide ) { AbstractMaze maze ; Map < String , Location > mazeMap ; do { maze = new Maze ( Mode . valueOf ( gameMode ) . getWidth ( ) , Mode . valueOf ( gameMode ) . getHeight ( ) ) ; mazeMap = generateGameLocations ( maze ) ; } while ( mazeMap . size ( ) < MIN_PATHS ) ; putObjective ( maze , mazeMap ) ; putEnemies ( maze , mazeMap , gameMode ) ; guide . setPlayground ( maze ) ; return initStartLocation ( mazeMap , maze , team ) ; }
Initialize maze and all locations in it
 @param team     team
 @param gameMode game mode
 @return start location
Initialize maze and all locations in it @param team team @param gameMode game mode @return start location