Exemple #1
0
 /**
  * Paint all chess pieces according to the given Chesspresso Position.
  *
  * @param chessGame
  */
 void paintChessPieces(Position chessGame) {
   for (int row = 0; row < 8; ++row) {
     for (int col = 0; col < 8; ++col) {
       paintChessPiece(row, col, chessGame.getStone(row * 8 + col));
     }
   }
 }
 /**
  * Paint all chess pieces according to the given Chesspresso Position.
  *
  * @param chessGame
  */
 void paintChessPieces(Position chessGame) {
   if (chessSet.hasMovablePieces()) {
     chessSet.syncToPosition(chessGame, this);
   } else {
     for (int row = 0; row < 8; ++row) {
       for (int col = 0; col < 8; ++col) {
         paintChessPiece(row, col, chessGame.getStone(row * 8 + col));
       }
     }
   }
 }