public MapFinale(ConfigurationGame _conf)
        {
            InitializeComponent();
            time = DateTime.Now;
            conf = _conf;
            switch (conf.Plateau.mytype)
            {
                case MapType.portoloin:
                    design = new MapDesign(Properties.Resources.chaussure, Properties.Resources.sol,
                        Properties.Resources.saule_cogneur, Properties.Resources.bourse);
                    break;
                case MapType.labyrinthe:
                    design = new MapDesign(Properties.Resources.saule_cogneur, Properties.Resources.sol,
                        Properties.Resources.cailloux, Properties.Resources.bourse);
                    break;
                case MapType.standard:
                    design = new MapDesign(Properties.Resources.saule_cogneur, Properties.Resources.sol,
                        Properties.Resources.cailloux, Properties.Resources.bourse);
                    break;
            }

            maSimulation = new GameSimulation(conf, WriteLog);

            UpdateMapLayout();
        }
        public GameBackgroundWorker(GameSimulation game, MapFinale map)
        {
            this.game = game;
            this.map = map;
            worker.DoWork += worker_DoWork;
            worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            worker.WorkerReportsProgress = true;
            worker.ProgressChanged += new ProgressChangedEventHandler(worker_ReportProgress);
            worker.WorkerSupportsCancellation = true;

            worker.RunWorkerAsync();
        }
Esempio n. 3
0
 public void SaveGame(GameSimulation _gm)
 {
     this.historySimulations.Add(_gm);
 }
Esempio n. 4
0
 public void SaveGame(GameSimulation _gm)
 {
     this.historySimulations.Add(_gm);
 }