Esempio n. 1
0
 public WoodsyBoardData()
 {
     // board constructor: board starts out empty.
     this.board  = new int[8, 8]; // rows first, then columns.  .
     this.height = 8;
     this.width  = 8;
     // note: the edges have Green Grass pieces, showing where the people and houses go.
     for (int i = 0; i < this.height; i++)
     {
         for (int j = 0; j < this.width; j++)
         {
             if (i == 0 || j == 0 || i + 1 == this.height || j + 1 == this.width)
             {
                 this.board[i, j] = Pieces.createGreenGrassPiece();
             }
             else
             {
                 this.board[i, j] = Pieces.createBlankPiece();
             }
         }
     }
 }