Пример #1
0
  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;
  }