{"id":15674778,"url":"https://github.com/loks0n/rapid-draughts","last_synced_at":"2025-06-26T01:02:36.168Z","repository":{"id":65465223,"uuid":"592802802","full_name":"loks0n/rapid-draughts","owner":"loks0n","description":"A super speedy, blazing fast, rocket-powered TypeScript draughts/checkers engine with move validation, AI and game history.","archived":false,"fork":false,"pushed_at":"2025-03-19T16:25:46.000Z","size":408,"stargazers_count":17,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T01:02:32.614Z","etag":null,"topics":["bitboard","boardgame","checkers","checkers-engine","draughts","draughts-engine","game"],"latest_commit_sha":null,"homepage":"https://loks0n.dev/projects/rapid-draughts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loks0n.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-24T15:14:43.000Z","updated_at":"2025-06-04T20:34:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"7af049e6-316b-4052-9440-de947fb3f4a6","html_url":"https://github.com/loks0n/rapid-draughts","commit_stats":{"total_commits":68,"total_committers":1,"mean_commits":68.0,"dds":0.0,"last_synced_commit":"7d8c5b152a24c6ac53681984a78872355f9eea49"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/loks0n/rapid-draughts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loks0n%2Frapid-draughts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loks0n%2Frapid-draughts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loks0n%2Frapid-draughts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loks0n%2Frapid-draughts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loks0n","download_url":"https://codeload.github.com/loks0n/rapid-draughts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loks0n%2Frapid-draughts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261978905,"owners_count":23239417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitboard","boardgame","checkers","checkers-engine","draughts","draughts-engine","game"],"created_at":"2024-10-03T15:50:35.923Z","updated_at":"2025-06-26T01:02:36.127Z","avatar_url":"https://github.com/loks0n.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rapid-draughts ⚡\n\n[![npm version](https://badge.fury.io/js/rapid-draughts.svg)](https://badge.fury.io/js/rapid-draughts)\n![Downloads](https://img.shields.io/npm/dt/rapid-draughts)\n![Known Vulnerabilities](https://snyk.io/test/github/loks0n/rapid-draughts/badge.svg)\n[![Package quality](https://packagequality.com/shield/rapid-draughts.png)](https://packagequality.com/#?package=rapid-draughts)\n![License](https://img.shields.io/github/license/loks0n/rapid-draughts?color=lightgrey)\n![Benchmark](https://img.shields.io/badge/Benchmarks-Available-brightgreen)\n\nA *super speedy, blazing fast, rocket-powered* TypeScript draughts/checkers engine with move validation, AI and game history.\n\nIt uses bitboards, a board representation that holds the draughts board in three 32 or 64 bit unsigned integers. One for the light pieces, dark pieces and the king pieces. Bitboards enable fast move generation and have minimal memory usage.\n\nThe english draughts / american checkers engine follows the [WCDF ruleset](https://www.wcdf.net/rules.htm).\n\n## Installing\n\nRun the following command inside your node project:\n```bash\nnpm install rapid-draughts\n```\n\n## How To Use\n\n```typescript\nimport { DraughtsPlayer, DraughtsStatus } from 'rapid-draughts';\nimport {\n  EnglishDraughts as Draughts,\n  EnglishDraughtsComputerFactory as ComputerFactory,\n} from 'rapid-draughts/english';\n\n// Initialise the game\nconst draughts = Draughts.setup();\n\n// Show the available moves and play one.\nconsole.table(draughts.moves);\ndraughts.move(draughts.moves[0]);\n\n// Initialise two computer players\nconst weakComputer = ComputerFactory.random();\nconst strongComputer = ComputerFactory.alphaBeta({\n  maxDepth: 7,\n});\n\n// Play with the AIs until there is a winner\nwhile (draughts.status === DraughtsStatus.PLAYING) {\n  console.log(`${draughts.asciiBoard()}`);\n  console.log(`to_move = ${draughts.player}`);\n\n  const computerPlayer =\n    draughts.player === DraughtsPlayer.LIGHT ? weakComputer : strongComputer;\n\n  const move = await computerPlayer(draughts);\n  if (move) draughts.move(move);\n}\n\n// Announce the winner\nconsole.log(`${draughts.asciiBoard()}`);\nconsole.log(`status = ${draughts.status}`);\nconsole.log(`ended after ${draughts.history.moves.length} moves`);\n```\n\n## Online Demo\n\nrapid-draughts powers the draughts game site [draughts.org](https://draughts.org/). Check it out!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floks0n%2Frapid-draughts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floks0n%2Frapid-draughts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floks0n%2Frapid-draughts/lists"}