npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cardgamesplay/sixty-six

v0.1.0

Published

Browser-based Sixty-Six card game in TypeScript with smart AI, i18n, and responsive UI.

Readme

@cardgamesplay/sixty-six

A 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.

🎮 Play the live demo at cardgamesplay.com

Features

  • Full Sixty-Six gameplay loop with trick-taking, trump suit, stock drawing, and deal/match progression
  • Complete special actions: declare marriage, exchange trump nine, and close stock
  • Deal scoring logic for reached-66, all-cards-played, and closer-failed outcomes
  • Match formats: best of 1, best of 3, best of 5, and infinite
  • Three AI difficulties: easy, medium, and expert
  • Responsive game board with card animations and trick area transitions
  • Scoreboard with card points, game points, and match wins
  • Settings panel with difficulty, match format, and player/bot naming
  • Pause and fullscreen support
  • Synthesised sound effects via Web Audio API (no external SFX files)
  • SVG card rendering with Unicode/CSS fallback when SVG assets are unavailable
  • Internationalisation (i18n) for 16 locales with RTL support for Arabic
  • Language selector with localStorage persistence and cross-tab language sync
  • Console play utility for local AI/manual debugging
  • Auto-play simulation script for AI-vs-AI analysis

Project Structure

├── src/
│   ├── index.ts                 # App bootstrap and game wiring
│   ├── base.css                 # Shared game styles
│   ├── game/
│   │   ├── types.ts             # Core types, constants, and interfaces
│   │   ├── deck.ts              # 24-card deck creation + shuffle
│   │   ├── gameEngine.ts        # Core rules, legal moves, trick/deal/match flow
│   │   ├── ai.ts                # Easy/Medium/Expert move strategies
│   │   ├── scoring.ts           # Deal game-point scoring helpers
│   │   └── *.test.ts            # Unit + property-based tests
│   ├── ui/
│   │   ├── renderer.ts          # DOM renderer + animations + responsive layout
│   │   ├── scoreboard.ts        # Scoreboard updates and match status display
│   │   ├── settingsPanel.ts     # Settings modal and local persistence
│   │   ├── langSelector.ts      # Header language selector component
│   │   ├── audio.ts             # Synthesised Web Audio effects
│   │   └── *.test.ts            # UI tests
│   └── i18n/
│       ├── index.ts             # Locale registry, switching, DOM application
│       ├── en.ts                # Canonical locale shape
│       └── {bg,de,es,fr,hi,it,ja,ko,pl,pt,ru,tr,vi,zh,ar}.ts
├── index.html                   # Standalone dev shell
├── dev-entry.ts                 # Dev entry imports
├── dev.css                      # Dev-only style additions
├── console-sixty-six.mjs        # Terminal-based runner for gameplay testing
├── autoplay-sixty-six.mjs       # AI-vs-AI auto-play simulation
├── vite.config.ts               # Vite config
├── vitest.config.ts             # Vitest config (happy-dom)
├── tsconfig.json                # TypeScript config (dev)
├── tsconfig.build.json          # TypeScript config (build/declarations)
└── package.json

Getting Started

Prerequisites

  • Node.js >= 18
  • npm (or compatible package manager)

Install

npm install

Development

npm run dev

Starts a Vite dev server and runs the standalone shell at index.html.

Build

npm run build

Builds TypeScript declarations and bundles the library output into dist/.

Test

npm test

Runs Vitest suites with happy-dom, including engine, AI, scoring, i18n, audio, renderer, and settings tests.

Script Reference

  • npm run dev: start local development server
  • npm run build: compile declarations and bundle ESM output
  • npm run test: run all tests
  • npm run console:play: run CLI-based Sixty-Six in Node.js

Optional simulation utility:

node autoplay-sixty-six.mjs

Game Rules (Sixty-Six)

  1. The game uses a 24-card deck (9, J, Q, K, 10, A in each suit).
  2. Each player is dealt 6 cards in two rounds of 3 cards.
  3. The next card is turned face-up as trump; remaining cards form the stock.
  4. Lead and follow cards determine trick winner by suit/trump and rank order.
  5. Card points are counted by trick captures; first to 66 card points wins the deal.
  6. A marriage (King + Queen of same suit) can be declared when leading for bonus points.
  7. The trump nine can be exchanged with the face-up trump card under legal conditions.
  8. The stock may be closed strategically, forcing stricter follow rules.
  9. Deal game points are awarded based on loser points/tricks and close-stock outcomes.

Internationalisation

The UI supports 16 locales:

  • English (en)
  • Bulgarian (bg)
  • Spanish (es)
  • French (fr)
  • German (de)
  • Italian (it)
  • Portuguese (pt)
  • Russian (ru)
  • Chinese (zh)
  • Japanese (ja)
  • Korean (ko)
  • Arabic (ar, RTL)
  • Hindi (hi)
  • Vietnamese (vi)
  • Polish (pl)
  • Turkish (tr)

Language preference is persisted via localStorage and synchronized across tabs.

npm Package

Package name: @cardgamesplay/sixty-six

npm publish --access public

The package is configured with npm discoverability metadata (keywords, homepage, repository, bugs URL, and Node engine requirements).

Links

License

Licensed under the MIT License.