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.

9 lines (6 loc) 361 B
import { createSelector } from '@reduxjs/toolkit'; import { findCell } from 'lib'; import { selectBoard, selectResultCandidateCells } from 'state'; export const selectRowsWithCandidate = createSelector([selectBoard, selectResultCandidateCells], (board, cells) => { return board.rows.map((row, y) => row.map((cell, x) => findCell(cells, x, y) || cell)); });