[−][src]Struct pusoy_dos2::game::Game
Methods
impl Game
[src]
pub fn new(
num_decks: u8,
num_jokers: u8,
player_ids: &[String],
suit_order: [Suit; 4],
ruleset: Ruleset
) -> Game
[src]
num_decks: u8,
num_jokers: u8,
player_ids: &[String],
suit_order: [Suit; 4],
ruleset: Ruleset
) -> Game
pub fn play_move(
&mut self,
player_id: &str,
player_move: Vec<PlayedCard>
) -> Result<(), SubmitError>
[src]
&mut self,
player_id: &str,
player_move: Vec<PlayedCard>
) -> Result<(), SubmitError>
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]
hand: Vec<PlayedCard>,
last_move_option: Option<Hand>,
suit_order: [Suit; 4],
rank_order: [Rank; 13],
flush_precedence: FlushPrecedence
) -> bool
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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
unsafe fn from_abi(js: u32) -> Self
[src]
impl IntoWasmAbi for Game
[src]
type Abi = u32
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self) -> u32
[src]
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
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
[src]
impl RefMutFromWasmAbi for Game
[src]
type Abi = u32
Same as RefFromWasmAbi::Abi
type Anchor = RefMut<'static, Game>
Same as RefFromWasmAbi::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
[src]
impl Serialize for Game
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src]
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,