Expand description
§gametools
gametools provides utilities for working with common table game apparatus such as card decks,
dice, spinners, and dominos. The goal is to provide flexible, modular tools to simplify prototyping and building
games and simulations.
§Features
- Cards module that supports cards of any type, with 1 or 2 faces.
- Pre-defined StandardCard type for standard playing cards.
- Hand analytics for standard cards (detect straight, “n” of a kind, etc.) including Joker / wildcard handling.
- Numeric dice with up to 255 sides.
- Tools for playing with and transforming pools of dice.
- Spinners (random selectors) with “wedges” returning arbitrary types and can be covered/blocked or weighted.
- Domino set creation (up to full double-18) and management.
- Pathfinding with backtracking + pruning to find optimum domino train in a hand.
- Custom GameResult and GameError types to help with common game conditions.
Re-exports§
pub use dice::DicePool;pub use dice::Die;pub use cards::AddCard;pub use cards::Card;pub use cards::CardCollection;pub use cards::CardFaces;pub use cards::CardHand;pub use cards::Deck;pub use cards::Hand;pub use cards::Pile;pub use cards::Rank;pub use cards::Suit;pub use cards::TakeCard;pub use dominos::BonePile;pub use dominos::Domino;pub use dominos::DominoHand;pub use dominos::MAX_PIPS;pub use dominos::Train;pub use spinners::Spinner;pub use spinners::Wedge;pub use spinners::wedges_from_tuples;pub use spinners::wedges_from_values;pub use gameerror::GameError;
Modules§
- cards
- Cards Toolkit
- dice
- Dice Module
- dominos
- Dominos Module
- gameerror
- Game Error Module
- spinners
- Spinners Module