summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/main/Program.java
blob: 4692d2a2ded9706afa638a9f7055b7703a96ec1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package ch.epfl.maze.main;

import ch.epfl.maze.graphics.Display;
import ch.epfl.maze.simulation.Simulation;
import ch.epfl.maze.util.SimulationGenerator;

/**
 * Mini-project main program that will run the simulations on a {@code Display}.
 *
 * @author EPFL
 */
public class Program {

    public static final String DEFAULT_SIM = "maze";

    /**
     * Runs one of the two available simulations
     *
     * @see ch.epfl.maze.util.SimulationGenerator#getMazeSimulation()
     * @see ch.epfl.maze.util.SimulationGenerator#getMultiPreyDaedalusSimulation()
     */
    public static void main(String[] args) {
        String simName = args.length > 0 ? args[0] : DEFAULT_SIM;
        Simulation simulation = SimulationGenerator.getSimulation(simName);

        Display display = new Display(simulation);
        display.run();
    }

}