Files
card_game/card_game
2026-05-18 15:43:32 -07:00
..
2026-05-18 13:57:47 -07:00
2026-05-18 15:43:32 -07:00
2026-05-16 16:39:59 -07:00
2026-05-16 16:39:59 -07:00
2026-05-18 13:29:59 -07:00

Card Game

card_game is a collection of algorithms, structs, and enums which are useful to implement card games.

Example

use card_game::{Card, Deck, Rank, Stack, Suit};

// create a full deck (unshuffled)
let mut deck = Stack::full_deck(Deck::Deck1);

// inspect the top card
let card = deck.pop().unwrap();
assert_eq!(card, Card::new(Deck::Deck1, Suit::Diamonds, Rank::King));

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.