コード例 #1
0
ファイル: ChessBoard.java プロジェクト: woochany/ChessCraft
  public final void setPieceStyle(String pieceStyle) throws ChessException {
    if (boardStyle == null) {
      return;
    }

    ChessSet newChessSet = ChessSet.getChessSet(pieceStyle);
    boardStyle.verifyCompatibility(newChessSet);

    chessPieceSet = newChessSet;
  }
コード例 #2
0
  public final void setChessSet(String pieceStyle) throws ChessException {
    if (boardStyle == null) {
      return;
    }

    ChessSet newChessSet = ChessSetFactory.getChessSet(pieceStyle);
    boardStyle.verifyCompatibility(newChessSet);

    chessSet.syncToPosition(null, this);
    chessSet = newChessSet;
    redrawNeeded = true;
  }