Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 3
0
 public void SaveGame(GameSimulation _gm)
 {
     this.historySimulations.Add(_gm);
 }
Ejemplo n.º 4
0
 public void SaveGame(GameSimulation _gm)
 {
     this.historySimulations.Add(_gm);
 }