public static Game runGameFromGame(Controller controller, Game a_game, boolean visual, boolean accelerated)
    {
        m_controller = controller;
        controller.reset();

        //Create the game instance.
        a_game.go();
        a_game.getShip().setStarted(true);

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


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

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

            if(!accelerated)
                waitStep(10);

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

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

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


        return a_game;

    }