{"_id":"@cardgamesplay/sixty-six","name":"@cardgamesplay/sixty-six","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cardgamesplay/sixty-six","version":"0.1.0","description":"Browser-based Sixty-Six card game in TypeScript with smart AI, i18n, and responsive UI.","license":"MIT","author":{"name":"Card Games Play"},"homepage":"https://www.cardgamesplay.com/","repository":{"type":"git","url":"git+https://github.com/bgbigbrother/sixty-six.git"},"bugs":{"url":"https://github.com/bgbigbrother/sixty-six/issues"},"keywords":["sixty-six","66","schnapsen","card game","trick taking","typescript","vite","browser game","i18n","ai","cardgamesplay"],"engines":{"node":">=18"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","default":"./dist/index.js","types":"./dist/index.d.ts"},"./game/*":{"import":"./dist/game/*.js","types":"./dist/game/*.d.ts"},"./ui/*":{"import":"./dist/ui/*.js","types":"./dist/ui/*.d.ts"},"./i18n":{"import":"./dist/i18n/index.js","types":"./dist/i18n/index.d.ts"},"./i18n/*":{"import":"./dist/i18n/*.js","types":"./dist/i18n/*.d.ts"}},"publishConfig":{"access":"public","main":"./dist/index.js","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./game/*":{"import":"./dist/game/*.js","types":"./dist/game/*.d.ts"},"./ui/*":{"import":"./dist/ui/*.js","types":"./dist/ui/*.d.ts"},"./i18n":{"import":"./dist/i18n/index.js","types":"./dist/i18n/index.d.ts"},"./i18n/*":{"import":"./dist/i18n/*.js","types":"./dist/i18n/*.d.ts"}}},"scripts":{"dev":"vite","build":"tsc -p tsconfig.build.json && vite build","console:play":"node ./console-sixty-six.mjs","prepublishOnly":"npm run build","test":"vitest --run"},"devDependencies":{"@vitest/coverage-istanbul":"^1.6.1","@vitest/coverage-v8":"^1.6.1","@vitest/ui":"^1.0.0","fast-check":"^3.0.0","happy-dom":"^20.8.9","typescript":"^5.0.0","vite":"^5.0.0","vitest":"^1.0.0"},"_id":"@cardgamesplay/sixty-six@0.1.0","gitHead":"3d2c9b8789315cdc9ea5e760e38a08c9b759468f","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-zDCUPNypxfqcNntP1p3WMQqR+jiUVUQnkR5QoH6bY4whviFiL0yQ1/5I5DAiZ/jSoo6MsRfc2OBJL8zO7oWK4w==","shasum":"7aeb070a5fdc95e0e3769fc23879ce7feb758c48","tarball":"https://registry.npmjs.org/@cardgamesplay/sixty-six/-/sixty-six-0.1.0.tgz","fileCount":46,"unpackedSize":530682,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGTM3bN0ScPQLPfqjaO9l2ekzXoZQWFbKLp92uyPFoqCAiEAqFZP5Hl29zLqhUvB9msrOUEI/RmVo4TyZrniobmeARM="}]},"_npmUser":{"name":"tedonash","email":"tedo.nash@gmail.com"},"directories":{},"maintainers":[{"name":"tedonash","email":"tedo.nash@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sixty-six_0.1.0_1778615115630_0.14441036969348953"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-12T19:45:15.494Z","0.1.0":"2026-05-12T19:45:15.838Z","modified":"2026-05-12T19:45:16.047Z"},"maintainers":[{"name":"tedonash","email":"tedo.nash@gmail.com"}],"description":"Browser-based Sixty-Six card game in TypeScript with smart AI, i18n, and responsive UI.","homepage":"https://www.cardgamesplay.com/","keywords":["sixty-six","66","schnapsen","card game","trick taking","typescript","vite","browser game","i18n","ai","cardgamesplay"],"repository":{"type":"git","url":"git+https://github.com/bgbigbrother/sixty-six.git"},"author":{"name":"Card Games Play"},"bugs":{"url":"https://github.com/bgbigbrother/sixty-six/issues"},"license":"MIT","readme":"# @cardgamesplay/sixty-six\n\nA browser-based Sixty-Six card game built with TypeScript, Vite, and vanilla DOM. It includes full game rules (marriages, trump exchange, stock closing), multiple AI levels, responsive UI, synthesised audio, and internationalisation support for 16 languages.\n\n**🎮 [Play the live demo at cardgamesplay.com](https://www.cardgamesplay.com/)**\n\n## Features\n\n- Full Sixty-Six gameplay loop with trick-taking, trump suit, stock drawing, and deal/match progression\n- Complete special actions: declare marriage, exchange trump nine, and close stock\n- Deal scoring logic for reached-66, all-cards-played, and closer-failed outcomes\n- Match formats: best of 1, best of 3, best of 5, and infinite\n- Three AI difficulties: easy, medium, and expert\n- Responsive game board with card animations and trick area transitions\n- Scoreboard with card points, game points, and match wins\n- Settings panel with difficulty, match format, and player/bot naming\n- Pause and fullscreen support\n- Synthesised sound effects via Web Audio API (no external SFX files)\n- SVG card rendering with Unicode/CSS fallback when SVG assets are unavailable\n- Internationalisation (i18n) for 16 locales with RTL support for Arabic\n- Language selector with localStorage persistence and cross-tab language sync\n- Console play utility for local AI/manual debugging\n- Auto-play simulation script for AI-vs-AI analysis\n\n## Project Structure\n\n```text\n├── src/\n│   ├── index.ts                 # App bootstrap and game wiring\n│   ├── base.css                 # Shared game styles\n│   ├── game/\n│   │   ├── types.ts             # Core types, constants, and interfaces\n│   │   ├── deck.ts              # 24-card deck creation + shuffle\n│   │   ├── gameEngine.ts        # Core rules, legal moves, trick/deal/match flow\n│   │   ├── ai.ts                # Easy/Medium/Expert move strategies\n│   │   ├── scoring.ts           # Deal game-point scoring helpers\n│   │   └── *.test.ts            # Unit + property-based tests\n│   ├── ui/\n│   │   ├── renderer.ts          # DOM renderer + animations + responsive layout\n│   │   ├── scoreboard.ts        # Scoreboard updates and match status display\n│   │   ├── settingsPanel.ts     # Settings modal and local persistence\n│   │   ├── langSelector.ts      # Header language selector component\n│   │   ├── audio.ts             # Synthesised Web Audio effects\n│   │   └── *.test.ts            # UI tests\n│   └── i18n/\n│       ├── index.ts             # Locale registry, switching, DOM application\n│       ├── en.ts                # Canonical locale shape\n│       └── {bg,de,es,fr,hi,it,ja,ko,pl,pt,ru,tr,vi,zh,ar}.ts\n├── index.html                   # Standalone dev shell\n├── dev-entry.ts                 # Dev entry imports\n├── dev.css                      # Dev-only style additions\n├── console-sixty-six.mjs        # Terminal-based runner for gameplay testing\n├── autoplay-sixty-six.mjs       # AI-vs-AI auto-play simulation\n├── vite.config.ts               # Vite config\n├── vitest.config.ts             # Vitest config (happy-dom)\n├── tsconfig.json                # TypeScript config (dev)\n├── tsconfig.build.json          # TypeScript config (build/declarations)\n└── package.json\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js >= 18\n- npm (or compatible package manager)\n\n### Install\n\n```bash\nnpm install\n```\n\n### Development\n\n```bash\nnpm run dev\n```\n\nStarts a Vite dev server and runs the standalone shell at `index.html`.\n\n### Build\n\n```bash\nnpm run build\n```\n\nBuilds TypeScript declarations and bundles the library output into `dist/`.\n\n### Test\n\n```bash\nnpm test\n```\n\nRuns Vitest suites with `happy-dom`, including engine, AI, scoring, i18n, audio, renderer, and settings tests.\n\n## Script Reference\n\n- `npm run dev`: start local development server\n- `npm run build`: compile declarations and bundle ESM output\n- `npm run test`: run all tests\n- `npm run console:play`: run CLI-based Sixty-Six in Node.js\n\nOptional simulation utility:\n\n```bash\nnode autoplay-sixty-six.mjs\n```\n\n## Game Rules (Sixty-Six)\n\n1. The game uses a 24-card deck (9, J, Q, K, 10, A in each suit).\n2. Each player is dealt 6 cards in two rounds of 3 cards.\n3. The next card is turned face-up as trump; remaining cards form the stock.\n4. Lead and follow cards determine trick winner by suit/trump and rank order.\n5. Card points are counted by trick captures; first to 66 card points wins the deal.\n6. A marriage (King + Queen of same suit) can be declared when leading for bonus points.\n7. The trump nine can be exchanged with the face-up trump card under legal conditions.\n8. The stock may be closed strategically, forcing stricter follow rules.\n9. Deal game points are awarded based on loser points/tricks and close-stock outcomes.\n\n## Internationalisation\n\nThe UI supports 16 locales:\n\n- English (`en`)\n- Bulgarian (`bg`)\n- Spanish (`es`)\n- French (`fr`)\n- German (`de`)\n- Italian (`it`)\n- Portuguese (`pt`)\n- Russian (`ru`)\n- Chinese (`zh`)\n- Japanese (`ja`)\n- Korean (`ko`)\n- Arabic (`ar`, RTL)\n- Hindi (`hi`)\n- Vietnamese (`vi`)\n- Polish (`pl`)\n- Turkish (`tr`)\n\nLanguage preference is persisted via localStorage and synchronized across tabs.\n\n## npm Package\n\nPackage name: `@cardgamesplay/sixty-six`\n\n```bash\nnpm publish --access public\n```\n\nThe package is configured with npm discoverability metadata (keywords, homepage, repository, bugs URL, and Node engine requirements).\n\n## Links\n\n- **[Play Online](https://www.cardgamesplay.com/)**\n- [GitHub Repository](https://github.com/bgbigbrother/sixty-six)\n- [npm Package](https://www.npmjs.com/package/@cardgamesplay/sixty-six)\n- [Report an Issue](https://github.com/bgbigbrother/sixty-six/issues)\n\n## License\n\nLicensed under the [MIT License](./LICENSE.md).\n","readmeFilename":"README.md","_rev":"1-86c13e116e48ecf558857433dbd08cc8"}