[][src]Struct pusoy_dos2::game::Game

pub struct Game { /* fields omitted */ }

Methods

impl Game[src]

pub fn new(
    num_decks: u8,
    num_jokers: u8,
    player_ids: &[String],
    suit_order: [Suit; 4],
    ruleset: Ruleset
) -> Game
[src]

pub fn play_move(
    &mut self,
    player_id: &str,
    player_move: Vec<PlayedCard>
) -> Result<(), SubmitError>
[src]

pub fn get_player(&self, id: &str) -> Option<Player>[src]

pub fn get_next_player(&self) -> Option<String>[src]

pub fn get_last_move(&self) -> Option<Hand>[src]

pub fn suggest_move(&self, id: &str) -> Option<Vec<PlayedCard>>[src]

pub fn get_winners(&self) -> Vec<String>[src]

pub fn check_move(&self, hand: Vec<PlayedCard>) -> bool[src]

pub fn check_move_m(
    hand: Vec<PlayedCard>,
    last_move_option: Option<Hand>,
    suit_order: [Suit; 4],
    rank_order: [Rank; 13],
    flush_precedence: FlushPrecedence
) -> bool
[src]

pub fn get_suit_order(&self) -> [Suit; 4][src]

pub fn get_rank_order(&self) -> [Rank; 13][src]

Trait Implementations

impl Debug for Game[src]

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

impl From<Game> for JsValue[src]

impl FromWasmAbi for Game[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for Game[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl OptionFromWasmAbi for Game[src]

impl OptionIntoWasmAbi for Game[src]

impl RefFromWasmAbi for Game[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

type Anchor = Ref<'static, Game>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl RefMutFromWasmAbi for Game[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

type Anchor = RefMut<'static, Game>

Same as RefFromWasmAbi::Anchor

impl Serialize for Game[src]

impl WasmDescribe 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: Deserialize<'de>, 
[src]

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

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

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

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.