[][src]Trait ggpf::game::Game

pub trait Game: Playable {
    type Player: Hash + PartialEq + Eq + Copy + Clone + Debug + Sync + Send + Into<u8>;
    fn player_after(player: Self::Player) -> Self::Player;
fn players() -> Vec<Self::Player>;
fn turn(&self) -> Self::Player; }

Game with one or multiple players.

Associated Types

type Player: Hash + PartialEq + Eq + Copy + Clone + Debug + Sync + Send + Into<u8>

The type representing each player.

Loading content...

Required methods

fn player_after(player: Self::Player) -> Self::Player

Assuming a static player order, returns who should play after given player.

fn players() -> Vec<Self::Player>

Returns the list of players for the game.

fn turn(&self) -> Self::Player

Returns whose turn it is.

Loading content...

Implementors

impl Game for Breakthrough[src]

type Player = Color

impl Game for MisereBreakthrough[src]

type Player = Color

impl<G> Game for Simulated<G> where
    G: Features + 'static, 
[src]

type Player = G::Player

impl<G: Game + Clone + Sync + Send> Game for WithHistory<G>[src]

type Player = G::Player

impl<G: Singleplayer> Game for G[src]

A single-player game can be written as a game with a default player that plays all the turns.

type Player = u8

Loading content...