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.

20 lines (15 loc) 614 B
import { Game } from '@scrabble-solver/types'; import { localStorage } from '../localStorage'; import { guessLocale } from './lib'; import type { SettingsState } from './types'; const isTouchScreen = typeof globalThis.matchMedia !== 'undefined' && globalThis.matchMedia('(hover: none)').matches; export const settingsInitialState: SettingsState = { autoGroupTiles: null, game: Game.Scrabble, highlightUnreachableCells: false, inputMode: isTouchScreen ? 'touchscreen' : 'keyboard', locale: guessLocale(), removeCellFilters: 'always', showCoordinates: 'hidden', ...localStorage.getSettings(), };