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
- Standard 52-card deck handling with tools for decks, piles, and hands.
- Numeric dice with up to 255 sides.
- Tools for playing with pools of dice.
- Spinners 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::CardHand;
pub use cards::Deck;
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::Train;
pub use dominos::MAX_PIPS;
pub use spinners::wedges_from_tuples;
pub use spinners::wedges_from_values;
pub use spinners::Spinner;
pub use spinners::Wedge;
pub use gameerror::GameError;
Modules§
- cards
- Cards Module
- dice
- Dice Module
- dominos
- Dominos Module
- gameerror
- Game Error Module
- spinners
- Spinners Module