Beispiel #1
0
        private void PaintSquare(int squarePosition, DFSColor color)
        {
            var row = _squares.getRowFromPosition(squarePosition);
            var col = _squares.getColFromPosition(squarePosition);

            PaintSquare(row, col, color);
        }
Beispiel #2
0
        private void PaintSquare(int row, int col, DFSColor color)
        {
            var c = ' ';

            if (color == DFSColor.Grey)
            {
                c = '\\';
            }
            else if (color == DFSColor.Black)
            {
                c = 'X';
            }
            for (var i = 1; i < _squares.getHeight(); i++)
            {
                for (var j = 1; j < _squares.getWidth() - 2; j++)
                {
                    _boardRpr[row][i][GetSquareRprIndex(col) + j] = c;
                    if (i == _squares.getHeight() - 1 && color == DFSColor.White)
                    {
                        _boardRpr[row][i][GetSquareRprIndex(col) + j] = '_';
                    }
                }
            }
        }
Beispiel #3
0
 public PlayerCell()
 {
     this.color          = DFSColor.White;
     this.distFromSource = int.MaxValue;
 }
 public DFSVertex(Vertex <T> vertex, DFSColor color)
 {
     Vertex = vertex;
     Color  = color;
 }