Skip to main content

play_game

Function play_game 

Source
pub fn play_game<R: Rng + ?Sized>(
    game: &mut Game,
    strategies: &mut [&mut dyn Strategy],
    rng: &mut R,
) -> Result<Vec<u16>, EngineError>
Expand description

Plays the game to completion and returns the final totals in seat order.

§Errors

EngineError::IllegalAction if any strategy misbehaves; the game is left at the failing turn.

§Panics

Panics if strategies does not have one entry per player.