public static Game runGame(Controller controller, boolean visual, boolean accelerated,
                               char[][] map, Vector2d startingPoint, LinkedList<Vector2d> wayPoints, LinkedList<Vector2d> fuelTanks)
    {
        m_controller = controller;
        controller.reset();

        //Create the game instance.
        m_game = new Game(map, startingPoint, wayPoints,fuelTanks);
        m_game.go();
        m_game.getShip().setStarted(true);

        JEasyFrame frame = null;
        if(visual)
        {
            //View of the game, if applicable.
            m_view = new PTSPView(m_game, m_game.getMapSize(), m_game.getMap(), m_game.getShip(), m_controller);
            frame = new JEasyFrame(m_view, "PTSP-Game: " + m_controller.toString());
        }

        while(!m_game.isEnded())
        {
            //When the result is expected:
            long due = System.currentTimeMillis()+PTSPConstants.ACTION_TIME_MS;

            //Advance the game.
            m_game.tick(m_controller.getAction(m_game.getCopy(), due));

            if(!accelerated)
                waitStep(10);

            //And paint everything.
            if(visual)
            {
                m_view.repaint();
            }
        }

        //Print results.
        if(m_verbose)
            m_game.printResults();

        //And save the route, if requested:
        if(m_writeOutput)
            m_game.saveRoute();

        return m_game;

    }