*/
private boolean dropLetterOnBoard(Player player, int vertCase, int horiCase) {
if (player != null
&& mainFrame.getMultiplayerPanel().getAction().isMyTurn()) {
Letter letter = player.getSelectedLetter();
// Ensure letter exists and board case is free
if (letter != null
&& this.board.getCase(vertCase, horiCase).getState() == FREE) {
// Choose if joker
if (letter.getName() == Bag.JOKER) {
Object result = JOptionPane.showInputDialog(
this.panel, getMessagesLang("Which letter ?"), "Joker",
OK_CANCEL_OPTION, null, Bag.AVAILABLE_LETTERS, 0);
Debug.console("dropLetterOnBoard", "choose joker",
String.valueOf(result));
if (result != null) {
letter.setJokerChar((Character) result);
}
else {
letter.setJokerChar(Bag.JOKER);
}
}
// Assign letter on board
if (letter.getJokerChar() != Bag.JOKER) {
this.board.setCaseLetter(vertCase, horiCase, letter, true);
// Remove letter from player rack
player.getRack().removeLetter(letter);