private void SaveState() { var state = new CanvasCell[Width, Height]; Array.Copy(Cells, state, Cells.Length); _previousStates.Push(state); }
private void Initialize(uint width, uint height) { Cells = new CanvasCell[width, height]; for (var i = 0; i < width; i++) { for (var j = 0; j < height; j++) { Cells[i, j] = new CanvasCell(CanvasCellContentType.Empty, ' '); } } }
private void DrawPoint(Point point) { var cellContent = new CanvasCell(CanvasCellContentType.Line, 'x'); Cells[point.X, point.Y] = cellContent; }