Esempio n. 1
0
 /**
  * Converts the input PlayerToken to the other side. The particular token can not be converted
  * back, till the end of the game.
  *
  * @param board
  * @param tkn PlayerToken to be converted.
  */
 public void convertToken(Board board, PlayerToken tkn) {
   // Check if PlayerToken is converted previously:
   boolean isconverted = board.isConverted(tkn);
   if (!isconverted) {
     // Come to the dark side, we have cookies..
     tkn.setOwn(this.getTurn().side());
     this.getTurn().side().tokens.add(tkn);
     board.convertedTokens.add(tkn);
   }
 }