UNPKG

scrabble-solver

Version:

Scrabble Solver 2 - Free, open-source, cross-platform, multi-language analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Literaki, and Kelimelik. Quickly find the top-scoring words using the given board and tiles.

34 lines (33 loc) 812 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Bonus = void 0; class Bonus { constructor({ multiplier, score, x, y }) { this.multiplier = multiplier; this.score = score; this.x = x; this.y = y; } canApply(_config, cell) { return cell.isEmpty && this.matchesCellCoordinates(cell); } matchesCellCoordinates(cell) { return this.x === cell.x && this.y === cell.y; } toJson() { return { multiplier: this.multiplier, score: this.score, type: this.type, x: this.x, y: this.y, }; } get value() { return { characterMultiplier: 1, wordMultiplier: 1, }; } } exports.Bonus = Bonus;