INNER CODE UNIT · C#

cell

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

            cell = _cells[x + (y * _width)];

            return true;
        }

        public override string ToString()
        {
            var sb = new StringBuilder();
            for (var y = 0; y < _height; y++)
            {
                for (var x = 0; x < _width; x++)
                {
                    if (TryGetCell(x, y, out var cell))
                    {
                        sb.Append(cell.IsAlive ? "x" : ".");
                    }
                }
                sb.AppendLine();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…