theimpossibleastronaut / deckhandler

Library to handle a deck of cards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

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 card

Detailed example usage can be seen in example-01.c and aa-pokerhands

Dependencies

  • meson (for the build system)

Building

meson builddir
cd builddir
ninja

That 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 install

To uninstall:

ninja uninstall

Projects that use deckhandler

Using the library with other languages

See SWIG_INTERFACE.md

About

Library to handle a deck of cards

License:GNU General Public License v3.0


Languages

Language:C 74.6%Language:Meson 21.4%Language:SWIG 4.0%