INNER CODE UNIT · C#

_cells

Cysharp/LogicLooper · samples/LoopHostingApp/LifeGameLoop.cs:101

            _cells = new Cell[width * height];

            for (var x = 0; x < width; x++)
            {
                for (var y = 0; y < height; y++)
                {
                    _cells[x + (y * width)] = new Cell();
                }
            }
        }

        public void Set(int x, int y, bool isAlive)
        {
            if (!TryGetCell(x, y, out var cell))
            {
                throw new ArgumentOutOfRangeException();
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…