コード例 #1
0
 public ChessBoard()
 {
     for (int i = 0; i < 8; i++)
     {
         for (int j = 0; j < 8; j++)
         {
             if ((i + j) % 2 == 0)
             {
                 Board[i, j] = new BoardSquare("BLACK");
             }
             else
             {
                 Board[i, j] = new BoardSquare("WHITE");
             }
         }
     }
     PlacePieces();
 }
コード例 #2
0
 public ChessBoard()
 {
     for (int i = 0; i < 8; i++)
     {
         for (int j = 0; j < 8; j++)
         {
             if ((i + j) % 2 == 0)
             {
                 Board[i, j] = new BoardSquare("BLACK");
             }
             else
             {
                 Board[i, j] = new BoardSquare("WHITE");
             }
         }
     }
     PlacePieces();
 }