Package nl.nuggit.words.board

Examples of nl.nuggit.words.board.Booster


        Letter letter = language.getLetter(symbol);
        if (trayCopy.remove(symbol)) {
          // we place a matching tile
          tilesTakenFromTray++;
          word.getTiles().add(new Tile(letter));
          Booster booster = square.getBooster();
          letterValue = letter.getValue();
          if (booster != null) {
            letterValue = letterValue * booster.letterFactor();
            wordFactor = wordFactor * booster.wordFactor();
          }
        } else if (trayCopy.remove(Language.BLANK)) {
          // we place a blank tile
          tilesTakenFromTray++;
          word.getTiles().add(new Tile(new AppliedBlank(letter)));
View Full Code Here


      score += tile.getLetter().getValue();
    }

    // count the new tile, possibly with booster
    int letterValue = newTile.getLetter().getValue();
    Booster booster = line.getSquares()[position + wordIndex].getBooster();
    if (booster != null) {
      letterValue = letterValue * booster.letterFactor();
    }
    score += letterValue;

    if (booster != null) {
      score = score * booster.wordFactor();
    }
    String crossWord = sb.toString();
    boolean crossWordExists = language.getWords().contains(crossWord);
    if (crossWordExists) {
      word.setScore(word.getScore() + score);
View Full Code Here

TOP

Related Classes of nl.nuggit.words.board.Booster

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.