Struct tak::Game [] [src]

pub struct Game {
    // some fields omitted
}

Methods

impl Game
[src]

fn new(size: usize) -> Game

fn size(&self) -> usize

fn to_string(&self) -> String

fn play(&mut self, turn: &str) -> Result<Option<Player>, String>

fn play_parsed(&mut self, turn: Turn) -> Result<Option<Player>, String>

fn check_flat_winner(&self) -> Option<Player>

Checks for the winner via a flat win

Counts the number of pieces laid, and if either player is out of pieces, then tallies the points to determine the winner

Trait Implementations

impl Display for Game
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.