コード例 #1
0
        public Card(int rows)
        {
            _rows = rows;
            _card = new Square[rows, 5];

            int currentStart = 1;
            for (int col = 0; col < 5; col++)
            {
                var randomise = Randomizer.Randomize(currentStart, currentStart + rows - 1);

                for (int row = 0; row < rows; row++)
                    _card[row, col] = new Square(randomise[row]);

                currentStart = currentStart + rows;
            }
        }
コード例 #2
0
 public void AddSquare(Square square)
 {
     _squares.Add(square);
 }