Esempio n. 1
0
        private void SaveState()
        {
            var state = new CanvasCell[Width, Height];

            Array.Copy(Cells, state, Cells.Length);
            _previousStates.Push(state);
        }
Esempio n. 2
0
        private void Initialize(ICanvasDimentions canvasSize)
        {
            Cells = new CanvasCell[canvasSize.Width, canvasSize.Height];

            for (var i = 0; i < canvasSize.Width; i++)
            {
                for (var j = 0; j < canvasSize.Height; j++)
                {
                    Cells[i, j] = new CanvasCell(CanvasCellContentType.Empty, ' ');
                }
            }
        }
Esempio n. 3
0
        private void DrawPoint(Point point)
        {
            var cellContent = new CanvasCell(CanvasCellContentType.Line, 'x');

            Cells[point.X, point.Y] = cellContent;
        }