A brute force solver for Microsoft Tri-Peaks solitaire written in TypeScript.
npm install
npm testRun npm run build to compile the package to dist/. The generated package supports CommonJS consumers and includes TypeScript declarations.
import {solve} from "javascript-tri-peaks-solitaire-solver";
const result = solve(pyramidCards, stockCards);You can see it in action on my website:
- Enter the string "8S TS 4D 7S 5D 7C 2D JH AC 3S 2H 3H 9H KC QC TD 8D 9C 7H 9D JS QS 4H 5C 5S 4C 2C QD 8C KD 3D KS JD 2S 7D KH AH 5H 9S 4S QH 6S 6D 3C JC TC 8H 6C TH AS AD 6H" into the textfield.
- Click "import"
- Click "solve"
This project started as an exercise in learning JavaScript and TypeScript.