UNPKG

scrabble-solver

Version:

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

9 lines (7 loc) 324 B
import type { CellFilterType } from '@/types'; export const toggleCellFilterState = (type: CellFilterType): CellFilterType | null => { const chain: (CellFilterType | null)[] = ['include', 'exclude', null]; const index = chain.indexOf(type); const nextIndex = (index + 1) % chain.length; return chain[nextIndex]; };