pub struct Game {
pub id: Uuid,
pub grid: Grid,
pub players: Vec<Player>,
pub actions_history: Vec<Action>,
pub turn: u64,
pub is_tournement_rule: bool,
pub current_player_index: usize,
}Fields§
§id: Uuid§grid: Grid§players: Vec<Player>§actions_history: Vec<Action>§turn: u64§is_tournement_rule: bool§current_player_index: usizeImplementations§
Source§impl Game
impl Game
pub fn tournament() -> Game
pub fn list_actions_for_player(&self, player: &Player) -> Vec<Action>
pub fn play_action(&mut self, action: Action)
pub fn winner(&self) -> GameWinnerState
Trait Implementations§
Auto Trait Implementations§
impl Forget for Game
impl Freeze for Game
impl Move for Game
impl RefUnwindSafe for Game
impl Send for Game
impl Sync for Game
impl Unpin for Game
impl UnsafeUnpin for Game
impl UnwindSafe for Game
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more