Quaternions
  • Joined on 2026-04-18

card_game (0.2.0)

Published 2026-05-18 20:12:26 +00:00 by Quaternions

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+https://git.aleshym.co/api/packages/Quaternions/cargo/" # Sparse index
# index = "https://git.aleshym.co/Quaternions/_cargo-index.git" # Git

[net]
git-fetch-with-cli = true
cargo add card_game@0.2.0

About this package

Card game library.

Card Game

card_game is a library to implement card games. Mainly interesting for the Game trait and the Session type.

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.

Dependencies

ID Version
arrayvec ^0.7.6

Keywords

card cards solitaire klondike
Details
Cargo
2026-05-18 20:12:26 +00:00
1
Rhys Lloyd <krakow20@gmail.com>
MIT OR Apache-2.0
8.1 KiB
Assets (1)
Versions (2) View all
0.2.0 2026-05-18
0.1.0 2026-05-16