pub struct MonsGame {
pub board: Board,
pub white_score: i32,
pub black_score: i32,
pub active_color: Color,
pub actions_used_count: i32,
pub mana_moves_count: i32,
pub mons_moves_count: i32,
pub white_potions_count: i32,
pub black_potions_count: i32,
pub turn_number: i32,
}
Fields§
§board: Board
§white_score: i32
§black_score: i32
§active_color: Color
§actions_used_count: i32
§mana_moves_count: i32
§mons_moves_count: i32
§white_potions_count: i32
§black_potions_count: i32
§turn_number: i32
Implementations§
Source§impl MonsGame
impl MonsGame
pub fn new() -> Self
pub fn with_params( board: Board, white_score: i32, black_score: i32, active_color: Color, actions_used_count: i32, mana_moves_count: i32, mons_moves_count: i32, white_potions_count: i32, black_potions_count: i32, turn_number: i32, ) -> Self
pub fn update_with(&mut self, other_game: &MonsGame)
pub fn process_input( &mut self, input: Vec<Input>, do_not_apply_events: bool, one_option_enough: bool, ) -> Output
pub fn apply_and_add_resulting_events( &mut self, events: Vec<Event>, ) -> Vec<Event>
pub fn next_inputs<F>( &self, locations: Vec<Location>, kind: NextInputKind, only_one: bool, specific: Option<Location>, filter: F, ) -> Vec<NextInput>
pub fn available_move_kinds(&self) -> HashMap<AvailableMoveKind, i32>
pub fn winner_color(&self) -> Option<Color>
pub fn is_later_than(&self, game: &MonsGame) -> bool
pub fn is_first_turn(&self) -> bool
pub fn player_potions_count(&self) -> i32
pub fn player_can_move_mon(&self) -> bool
pub fn player_can_move_mana(&self) -> bool
pub fn player_can_use_action(&self) -> bool
pub fn protected_by_opponents_angel(&self) -> HashSet<Location>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MonsGame
impl RefUnwindSafe for MonsGame
impl Send for MonsGame
impl Sync for MonsGame
impl Unpin for MonsGame
impl UnwindSafe for MonsGame
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