コード例 #1
0
        public Game(CellsImage cells)
        {
            generationTimer = new System.Timers.Timer(Config.Conf.timerInterval);
            generationTimer.Elapsed += gameMethod;
            int w = cells.Cells.GetLength(0);
            int h = cells.Cells.GetLength(1);
            Config.Conf.worldSize = new System.Drawing.Size(w, h);

            lg = new LifeGame(cells.Cells);
        }
コード例 #2
0
        public Game()
        {
            System.Drawing.Size s = Config.Conf.worldSize;

            lg = new LifeGame(new bool[s.Width, s.Height]);

            gameThread = new Thread(gameThreadMain);
            gameThread.Start();

            buff = new bool[s.Width, s.Height];
        }
コード例 #3
0
 public void Update(CellsImage cells)
 {
     lock (this)
     {
         lg = new LifeGame(cells);
     }
 }