Legal moves for whoever's turn it is - captures only, when one is available, since a capture is forced in checkers; forcedFrom narrows this to one piece mid-multi-jump.
forcedFrom
import { startingCheckers, checkersMoves } from '@datamoc/mw_games/board';const moves = checkersMoves(startingCheckers());console.log(moves.length); // 7 - every red piece on the back row can step forward Copy
import { startingCheckers, checkersMoves } from '@datamoc/mw_games/board';const moves = checkersMoves(startingCheckers());console.log(moves.length); // 7 - every red piece on the back row can step forward
Legal moves for whoever's turn it is - captures only, when one is available, since a capture is forced in checkers;
forcedFromnarrows this to one piece mid-multi-jump.