* @param last
*/
private int calculateWordPoints(
boolean isVert, int axis, int first, int last) {
BoardCase boardCase = null;
Letter letter = null;
int wordMult = 1, score = 0, letterValue = 0;
// Check from first letter to last
for (int index = first; index <= last; index++) {
if (isVert) {
boardCase = this.getCase(index, axis);
}
else {
boardCase = this.getCase(axis, index);
}
letter = boardCase.getLetter();
letterValue = letter.getValue();
// Apply bonus if not already used
if (!boardCase.getMultUsed()) {
letterValue *= boardCase.getLetterMult();
wordMult *= boardCase.getWordMult();
boardCase.setMultUsed(true);
}
score += letterValue;
}