// Path: genetic-car-server/src/main/java/fr/genetic/server/game/Game.java
// public class Game {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(Game.class);
// 
//     private static Map<Team, RunBoard> players = new ConcurrentHashMap<>();
// 
//     public static void clearGame() {
//         LOGGER.info("Delete all simulation");
//         players.clear();
//     }
// 
//     public static void createGame() {
//         LOGGER.info("Create all run board");
//         Simulation simulation = new Simulation();
//         Arrays.stream(Team.values())
//                 .forEach(team -> initForTeam(team, simulation));
//         LOGGER.info("Run board created");
//     }
// 
//     private static void initForTeam(Team team, Simulation simulation) {
//         List<CarDefinition> cars = IntStream.range(0, DEFAULT_GENERATION_SIZE / 2)
//                 .mapToObj(i -> CarDefinition.createRandomCar())
//                 .collect(Collectors.toList());
//         RunBoard runBoard = new RunBoard(simulation).runSimulation(cars);
//         LOGGER.info("Simulation created for team {} ({})", team, runBoard.champion.getScore());
//         players.put(team, runBoard);
//     }
// 
//     public static RunBoard getRunBoard(Team team) {
//         return players.get(team);
//     }
// 
//     public static Map<Team, RunBoard> players() {
//         return players;
//     }
// }
// 
// Path: genetic-car-server/src/main/java/fr/genetic/server/game/Team.java
// public enum Team {
// 
//     RED, YELLOW, BLUE, GREEN, ORANGE, PURPLE
// 
// }


import fr.genetic.server.game.Game;
import fr.genetic.server.game.Team;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
package fr.genetic.server.web.controller;


@RestController
public class GameController {

    @RequestMapping(value = "/game/teams", method = RequestMethod.GET)
    Team[] teams() {
        return Team.values();
    }

// Path: genetic-car-server/src/main/java/fr/genetic/server/game/Game.java
// public class Game {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(Game.class);
// 
//     private static Map<Team, RunBoard> players = new ConcurrentHashMap<>();
// 
//     public static void clearGame() {
//         LOGGER.info("Delete all simulation");
//         players.clear();
//     }
// 
//     public static void createGame() {
//         LOGGER.info("Create all run board");
//         Simulation simulation = new Simulation();
//         Arrays.stream(Team.values())
//                 .forEach(team -> initForTeam(team, simulation));
//         LOGGER.info("Run board created");
//     }
// 
//     private static void initForTeam(Team team, Simulation simulation) {
//         List<CarDefinition> cars = IntStream.range(0, DEFAULT_GENERATION_SIZE / 2)
//                 .mapToObj(i -> CarDefinition.createRandomCar())
//                 .collect(Collectors.toList());
//         RunBoard runBoard = new RunBoard(simulation).runSimulation(cars);
//         LOGGER.info("Simulation created for team {} ({})", team, runBoard.champion.getScore());
//         players.put(team, runBoard);
//     }
// 
//     public static RunBoard getRunBoard(Team team) {
//         return players.get(team);
//     }
// 
//     public static Map<Team, RunBoard> players() {
//         return players;
//     }
// }
// 
// Path: genetic-car-server/src/main/java/fr/genetic/server/game/Team.java
// public enum Team {
// 
//     RED, YELLOW, BLUE, GREEN, ORANGE, PURPLE
// 
// }


// Path: genetic-car-server/src/main/java/fr/genetic/server/web/controller/GameController.java
import fr.genetic.server.game.Game;
import fr.genetic.server.game.Team;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

package fr.genetic.server.web.controller;


@RestController
public class GameController {

    @RequestMapping(value = "/game/teams", method = RequestMethod.GET)
    Team[] teams() {
        return Team.values();
    }

    @RequestMapping(value="/game", method = RequestMethod.DELETE)