khrome / ccg-cli

Collectible Card Games on the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ccg-cli

cards

A framework for display and deck building on the command-line.

I used to play Magic when it was new along with Rage and some other CCGs and even was the subject for a card in the Arcadia card game. Now that I'm a parent, I taught my daughter Magic and now this is the perfect opportunity to teach software, design and ownership.

The library is currently in transition as it shifts to ESM in anticipation of ascii-art's ESM rebuild. Card abstraction is working, but CL client, and deck are unfinished.

Someday we may even integrate matchmaking and basic game mechanics.

Usage

Magic[TBD]

Display an image of the Vesuvan Doppelganger

ccg -g mtg lookup "Vesuvan Doppelganger"

List the cards from Arabian Nights and Unlimited which are still legal to play (filters are Mongo Query Documents).

ccg -g mtg list "set:arabian nights+set:unlimited edition" -f '{"legalities.standard":{"$eq":"legal"}}'

Testing

Run the es module tests to test the root modules

npm run import-test

to run the same test inside docker:

npm run container-test

Run the commonjs tests against the /dist commonjs source (generated with the build-commonjs target).

npm run require-test

Development

All work is done in the .mjs files and will be transpiled on commit to commonjs and tested.

If the above tests pass, then attempt a commit which will generate .d.ts files alongside the src files and commonjs classes in dist

About

Collectible Card Games on the command line

License:MIT License


Languages

Language:JavaScript 81.2%Language:HTML 15.6%Language:Dockerfile 2.1%Language:Shell 1.1%