[][src]Trait bulls_and_cows::play::players::Guesser

pub trait Guesser<T: Eq + Hash + Clone> {
    type Error;
    fn get_guess_times(&self) -> usize;
fn set_guess_times(&mut self, guess_times: usize);
fn add_condition(&mut self, guess: &[T], reply: (usize, usize));
fn guess(&self) -> Result<Vec<T>, Self::Error>; }

A player who make guesses in the game.

Associated Types

type Error

Loading content...

Required methods

fn get_guess_times(&self) -> usize

Get guess times of this player.

fn set_guess_times(&mut self, guess_times: usize)

Set guess times for this player.

fn add_condition(&mut self, guess: &[T], reply: (usize, usize))

Add a condition.

fn guess(&self) -> Result<Vec<T>, Self::Error>

Make a guess.

Loading content...

Implementors

impl<T: Eq + Hash + Clone> Guesser<T> for ComputerGuesser<T>[src]

type Error = HostError<T>

Loading content...