Skip to content

johnameyer/cards-ts

Repository files navigation

Cards-TS

Github CI npm version GitHub Last Commit Typescript Documentation

This is a card game framework and various card game implementations. The core package contains the framework and useful components, including functionality to display a card game in the command line. The various other packages are card game implementations.

Can I Have That is a house variation on Continental Rummy. Hearts and Euchre are trick-taking games. Other implementations of card games or expansions of the core library are welcome.

Getting Started

We use pnpm workspaces to support a number of games on top of the core library. See the documentation pages here or see the wiki articles here.

Running a card game with npx

npx @cards-ts/hearts # or can-i-have-that, etc.

Running a card game locally

Building

pnpm i # typically only needed the first time
pnpm buildall # use "--include-dependencies --scope=@cards-ts/$GAME" to just build the game dependencies

Running

GAME=can-i-have-that # or hearts, etc.
pnpm start --filter=@cards-ts/$GAME

or

GAME=can-i-have-that # or hearts, etc.
cd packages/$GAME
pnpm start

Testing

The tests in spec folder test that each game exports a minimum number of fields and that the bots will be able to complete the game successfully (Run with pnpm start in the folder locally). Each package can also contain a spec folder as well for unit testing components with mocha (Run all with pnpm testall or in a package with pnpm test).

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

About

A card game framework and various games in Typescript. The framework allows for bot development and playing card games in the terminal or in a browser.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •