Exemplo n.º 1
0
 /// <summary>
 /// Initializes an empty Board using the given <paramref name="rules"/>.
 /// </summary>
 /// <param name="rules">The rules that the board will adhere to.</param>
 public Board(IRules rules)
 {
     _rules    = rules;
     Winner    = MarkerType.Empty;
     SubBoards = new SubBoard[BoardSize, BoardSize];
     InitializeSubBoards();
 }
Exemplo n.º 2
0
 private void InitializeSubBoards()
 {
     for (var i = 0; i < BoardSize; i++)
     {
         for (var j = 0; j < BoardSize; j++)
         {
             SubBoards[i, j] = new SubBoard(_rules)
             {
                 IsActive = true
             };
         }
     }
 }