https://github.com/theimpossibleastronaut/deckhandler
Library to handle a deck of cards
https://github.com/theimpossibleastronaut/deckhandler
c cards library random-generation simulations swig
Last synced: 7 months ago
JSON representation
Library to handle a deck of cards
- Host: GitHub
- URL: https://github.com/theimpossibleastronaut/deckhandler
- Owner: theimpossibleastronaut
- License: gpl-3.0
- Created: 2018-08-24T15:30:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-06T05:15:21.000Z (10 months ago)
- Last Synced: 2024-12-06T06:20:36.059Z (10 months ago)
- Topics: c, cards, library, random-generation, simulations, swig
- Language: C
- Homepage:
- Size: 91.8 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
[](https://travis-ci.com/theimpossibleastronaut/deckhandler)
# deckhandler
Library that will create a deck of cards and shuffle it.Two functions are included:
deck_init_dh: initialize a deck
deck_shuffle_dh: shuffle the deck
get_card_face: get the "face" of a card
get_card_suit: get the suit of a cardDetailed example usage can be seen in
[example-01.c](https://github.com/theimpossibleastronaut/deckhandler/blob/master/test/test_01.c)
and
[aa-pokerhands](https://github.com/theimpossibleastronaut/aa-pokerhands)## Dependencies
* [meson](http://mesonbuild.com/Quick-guide.html) (for the build system)
## Building
meson setup builddir
cd builddir
ninjaThat will build the library, create the `example-01` executable and
then link to the library.## Tests
ninja test
meson test --setup=valgrind## Installation
To specify the installation directory (defaults to /usr/local) and
install the program:From *builddir*: `meson configure --prefix=
ninja installTo uninstall:
ninja uninstall
## Projects that use deckhandler
* [aa-pokerhands](https://github.com/theimpossibleastronaut/aa-pokerhands)
## Using the library with other languages
See [SWIG_INTERFACE.md](https://github.com/theimpossibleastronaut/deckhandler/blob/master/SWIG_INTERFACE.md)