Exemple #1
0
 public Board(Board other) : this(other._numPlayers)
 {
     accessible = (int[, ])other.accessible.Clone();
     for (int i = 0; i < _numPlayers; i++)
     {
         playerStatus[i] = new PlayerInfo(other.playerStatus[i]);
     }
     for (int i = 0; i < BOARD_SIZE; i++)
     {
         for (int j = 0; j < BOARD_SIZE; j++)
         {
             if (i < BOARD_SIZE - 1 && j < BOARD_SIZE - 1)
             {
                 wallPegStatus[i, j] = new WallPeg(other.wallPegStatus[i, j]);
             }
             boardStatus[i, j] = new gameSquareInfo(other.boardStatus[i, j]);
         }
     }
 }
Exemple #2
0
 public WallPeg(WallPeg other)
 {
     x      = other.x;
     y      = other.y;
     isOpen = other.isOpen;
 }