/// <summary>
        /// SingleplayerModeGameView constructor.
        /// </summary>
        /// <param name="applicationController"></param>
        /// <param name="car"></param>
        /// <param name="map"></param>
        public SingleplayerModeGameView(ApplicationController applicationController, Car car, Map map)
        {
            InitializeComponent();
            this.ApplicationController = applicationController;
            this.Car = car;
            this.Map = map;
            this.RawMapGrid = this.Map.GetDrawMapGrid();
            this.DrawUtility = new DrawUtility();

            this.CustomInitializeComponent();
            this.Refresh();

            this.RunGame();
        }
        private void rButtonStartGame_Click(object sender, EventArgs e)
        {
            if (this.manageProfileWidget1.HasValidProfile() && this.manageMapWidget1.HasMapSelected())
            {
                Map map = this.manageMapWidget1.GetMap();
                String playerName = this.manageProfileWidget1.GetPlayerName();
                Color carColor = this.manageProfileWidget1.GetCarColor();

                Player player = new Player(playerName);
                Car car = new Car(0, player, carColor, map);

                this.ApplicationController.StartSingleplayerModeGame(car, map);
            }
            else
            {
                MessageBox.Show("Invalid configuration.");
            }
        }
 public void StartSingleplayerModeGame(Car car, Map map)
 {
     this.SingleplayerMode.Hide();
     this.SingleplayerModeGameView = new SingleplayerModeGameView(this, car, map);
     this.SingleplayerModeGameView.Show();
 }