pub struct GameManager { /* private fields */ }Implementations§
Source§impl GameManager
impl GameManager
Sourcepub fn new<R, V>(reader: R, view: V) -> PreGameManagerwhere
R: InputReader + 'static,
V: View + 'static,
pub fn new<R, V>(reader: R, view: V) -> PreGameManagerwhere
R: InputReader + 'static,
V: View + 'static,
The main game object creator. Custom reader and viewer injection is performed using public trait objects, allowing for full customization.
Sourcepub fn start_game(self) -> PostGameManager
pub fn start_game(self) -> PostGameManager
Starts the turn-based game. It iterates over the players in a cycle until a winning condition is met. Consumes the current game state and return the next-phase object.
pub fn number_of_players(&self) -> usize
pub fn get_players(&self) -> &Vec<Player>
Auto Trait Implementations§
impl Freeze for GameManager
impl !RefUnwindSafe for GameManager
impl !Send for GameManager
impl !Sync for GameManager
impl Unpin for GameManager
impl !UnwindSafe for GameManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more