noitu
Version:
A Vietnamese word connection game library with word validation and next word finding capabilities
30 lines • 988 B
TypeScript
import { WordPair, WordDictionary, NextWordResult } from './types';
/**
* NextWordFinder class for finding the next word in the chain
*/
export declare class NextWordFinder {
private dictionary;
private wordChecker;
constructor(dictionary: WordDictionary);
/**
* Find the next word based on current word and game history
*/
findNextWord(currentWord: WordPair | null, history?: WordPair[]): NextWordResult;
/**
* Find a random first word to start the game
*/
private findFirstWord;
/**
* Get all possible moves for the current position
*/
getAllPossibleMoves(currentWord: WordPair | null, history?: WordPair[]): WordPair[];
/**
* Check if the game can continue from current position
*/
canContinue(currentWord: WordPair | null, history?: WordPair[]): boolean;
/**
* Normalize Vietnamese text for comparison
*/
private normalizeVietnamese;
}
//# sourceMappingURL=nextWordFinder.d.ts.map