return this.dir;
}
@Override
public void play(Board board, Player p) {
Location currentLoc = this.first.clone();
for (int i=0 ; i<this.word.length() ; i++) {
char c = this.word.charAt(i);
if (board.isFree(currentLoc.getH(), currentLoc.getV())) {
Letter currentLetter = null;
if (Character.isLowerCase(c)) {
currentLetter = p.getRack().getLetter(Bag.JOKER);
p.getRack().removeLetter(currentLetter);
currentLetter.setJokerChar(Character.toUpperCase(c));
}
else {
currentLetter = p.getRack().getLetter(c);
p.getRack().removeLetter(currentLetter);
}
board.setCaseLetter(currentLoc.getV(), currentLoc.getH(), currentLetter, true);
}
this.dir.applyTo(currentLoc);
}
}