[][src]Struct libtombala::types::Game

pub struct Game {
    pub id: u64,
    pub c1: Vec<u32>,
    pub c2: Vec<u32>,
    pub t: Vec<u32>,
    pub balls: Vec<u8>,
    pub card_state: HashMap<u32, CardState>,
    pub card_index_by_number: CardIndex,
}

Fields

id: u64c1: Vec<u32>c2: Vec<u32>t: Vec<u32>balls: Vec<u8>card_state: HashMap<u32, CardState>card_index_by_number: CardIndex

Methods

impl Game[src]

pub fn new(game_id: u64, index: CardIndex) -> Arc<RwLock<Game>>[src]

pub fn is_first5_c1(&self) -> bool[src]

pub fn is_first10_c2(&self) -> bool[src]

pub fn is_tulum(&self) -> bool[src]

pub fn new_game(&mut self) -> u64[src]

pub fn add_ball(&mut self, num: u8) -> Result<Option<Winning>, String>[src]

Trait Implementations

impl Clone for Game[src]

impl Debug for Game[src]

impl Default for Game[src]

impl<'de> Deserialize<'de> for Game[src]

impl Serialize for Game[src]

Auto Trait Implementations

impl RefUnwindSafe for Game

impl Send for Game

impl Sync for Game

impl Unpin for Game

impl UnwindSafe for Game

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,