1#![doc = include_str!("../README.md")]
2
3#[cfg(feature = "derive")]
4pub use card_game_derive::*;
5pub use card_stack as stack;
6pub use variadics_please;
8
9use crate::{cards::CardManager, identifications::PlayerIDBuilder};
10
11pub mod abilities;
12pub mod cards;
13pub mod commands;
14mod context;
15pub mod events;
16pub mod identifications;
17pub mod zones;
18pub use context::*;
19
20pub trait CardGameBuilder<EventManager: Default>: Sized {
21 type GenerationData;
22 type Game;
23 fn generate(
24 player_id_builder: PlayerIDBuilder,
25 card_manager: CardManager<EventManager>,
26 generation_data: Self::GenerationData,
27 ) -> Self::Game;
28 fn new(data: Self::GenerationData) -> Self::Game {
29 Self::generate(
30 PlayerIDBuilder::new(),
31 CardManager::new(EventManager::default()),
32 data,
33 )
34 }
35}