Exemple #1
0
        public LifeModel(Dimensions dim, Game life)
        {
            _dim     = dim;
            _current = new LifeTorus(dim);
            _life    = life;

            _prev     = new LifeTorus(dim);
            _pastprev = new LifeTorus(dim);

            SetLife();
        }
Exemple #2
0
        public void CopyTo(LifeTorus dest)
        {
            dest._width  = this._width;
            dest._height = this._height;
            var size = _width * _height;

            dest._array = new BitArray(size);

            for (int i = 0; i < this._array.Count; i++)
            {
                dest._array[i] = this._array[i];
            }
        }