[][src]Struct rsbwapi::game::Game

pub struct Game<'a> { /* fields omitted */ }

Implementations

impl<'a> Game<'a>[src]

pub fn can_research(&self, checker: impl CanResearch) -> BWResult<bool>[src]

pub fn can_upgrade(&self, checker: impl CanUpgrade) -> BWResult<bool>[src]

impl<'a> Game<'a>[src]

pub fn send_text_ex(&self, to_allies: bool, message: &str)[src]

pub fn send_text(&self, message: &str)[src]

pub fn set_map(&self, map_file_name: &str) -> Result<(), Error>[src]

pub fn draw_text_screen<P: Into<Position>>(&self, position: P, string: &str)[src]

pub fn draw_text_map<P: Into<Position>>(&self, position: P, string: &str)[src]

pub fn draw_text_mouse<P: Into<Position>>(&self, position: P, string: &str)[src]

pub fn draw_text<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    position: P,
    string: &str
)
[src]

pub fn draw_line_screen<P: Into<Position>>(
    &self,
    a: P,
    b: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_line_map<P: Into<Position>>(
    &self,
    a: P,
    b: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_line_mouse<P: Into<Position>>(
    &self,
    a: P,
    b: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_dot_screen<P: Into<Position>>(
    &self,
    p: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_dot_map<P: Into<Position>>(&self, p: P, color: Color, solid: bool)[src]

pub fn draw_dot_mouse<P: Into<Position>>(&self, p: P, color: Color, solid: bool)[src]

pub fn draw_dot<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    p: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_triangle_map<P: Into<Position>>(
    &self,
    a: P,
    b: P,
    c: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_triangle_mouse<P: Into<Position>>(
    &self,
    a: P,
    b: P,
    c: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_triangle_screen<P: Into<Position>>(
    &self,
    a: P,
    b: P,
    c: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_triangle<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    a: P,
    b: P,
    c: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_circle_map<P: Into<Position>>(
    &self,
    p: P,
    radius: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_circle_screen<P: Into<Position>>(
    &self,
    p: P,
    radius: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_circle_mouse<P: Into<Position>>(
    &self,
    p: P,
    radius: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_circle<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    p: P,
    radius: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_ellipse_screen<P: Into<Position>>(
    &self,
    p: P,
    xrad: i32,
    yrad: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_ellipse_map<P: Into<Position>>(
    &self,
    p: P,
    xrad: i32,
    yrad: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_ellipse_mouse<P: Into<Position>>(
    &self,
    p: P,
    xrad: i32,
    yrad: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_ellipse<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    p: P,
    xrad: i32,
    yrad: i32,
    color: Color,
    solid: bool
)
[src]

pub fn draw_line<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    a: P,
    b: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_box_map<P: Into<Position>>(
    &self,
    top_left: P,
    bottom_right: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_box_mouse<P: Into<Position>>(
    &self,
    top_left: P,
    bottom_right: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_box_screen<P: Into<Position>>(
    &self,
    top_left: P,
    bottom_right: P,
    color: Color,
    solid: bool
)
[src]

pub fn draw_box<P: Into<Position>>(
    &self,
    ctype: CoordinateType,
    top_left: P,
    bottom_right: P,
    color: Color,
    solid: bool
)
[src]

pub fn issue_command(&self, cmd: UnitCommand)[src]

pub fn set_alliance(
    &mut self,
    other: &Player<'_>,
    allied: bool,
    allied_victory: bool
)
[src]

pub fn set_reveal_all(&mut self, reveal: bool) -> Result<(), Error>[src]

pub fn set_vision(
    &mut self,
    player: &Player<'_>,
    enabled: bool
) -> Result<(), Error>
[src]

pub fn leave_game(&mut self)[src]

pub fn pause_game(&mut self)[src]

pub fn ping_minimap<P: Into<Position>>(&mut self, p: P)[src]

pub fn restart_game(&mut self)[src]

pub fn enable_flag(&mut self, flag: i32)[src]

pub fn set_frame_skip(&mut self, frame_skip: i32)[src]

pub fn set_gui(&mut self, enabled: bool)[src]

pub fn set_lat_com(&mut self, enabled: bool)[src]

pub fn set_local_speed(&mut self, speed: i32)[src]

impl<'a> Game<'a>[src]

pub fn can_build_here<P: Into<TilePosition>, B: Into<Option<&'a Unit<'a>>>>(
    &self,
    builder: B,
    position: P,
    type_: UnitType,
    check_explored: bool
) -> BWResult<bool>
[src]

pub fn can_command(&self, this_unit: &Unit<'_>) -> Result<bool, Error>[src]

pub fn can_make<B: Into<Option<&'a Unit<'a>>>>(
    &self,
    builder: B,
    type_: UnitType
) -> BWResult<bool>
[src]

pub fn countdown_timer(&self) -> i32[src]

pub fn elapsed_time(&self) -> i32[src]

pub fn enemies(&self) -> Vec<Player<'_>>[src]

pub fn get_average_fps(&self) -> f64[src]

pub fn get_player(&self, i: i32) -> Option<Player<'_>>[src]

pub fn get_region_at<P: Into<Position>>(&self, p: P) -> Option<Region<'_>>[src]

pub fn get_unit(&self, id: i32) -> Option<Unit<'_>>[src]

pub fn get_units_in_rectangle<A: Into<Position>, B: Into<Position>, P: IntoPredicate<Unit<'a>>>(
    &'a self,
    lt: A,
    rb: B,
    pred: P
) -> Vec<Unit<'_>>
[src]

pub fn get_units_on_tile<TP: Into<TilePosition>, P: IntoPredicate<Unit<'a>>>(
    &'a self,
    tile: TP,
    pred: P
) -> Vec<Unit<'_>>
[src]

pub fn get_closest_unit<P: Into<Position>, Pred: IntoPredicate<Unit<'a>>, R: Into<Option<i32>>>(
    &'a self,
    center: P,
    pred: Pred,
    radius: R
) -> Option<Unit<'a>>
[src]

pub fn get_closest_unit_in_rectangle<P: Into<Position>, Pred: IntoPredicate<Unit<'a>>, R: Into<Rectangle>>(
    &'a self,
    center: P,
    pred: Pred,
    rectangle: R
) -> Option<Unit<'a>>
[src]

pub fn get_players(&self) -> Vec<Player<'_>>[src]

pub fn get_selected_units(&self) -> Vec<Unit<'_>>[src]

pub fn get_static_geysers(&self) -> Vec<Unit<'_>>[src]

pub fn get_static_minerals(&self) -> Vec<Unit<'_>>[src]

pub fn has_path<S: Into<Position>, D: Into<Position>>(
    &self,
    source: S,
    destination: D
) -> bool
[src]

pub fn has_power<TP: Into<TilePosition>, TS: Into<TilePosition>>(
    &self,
    position: TP,
    size: TS
) -> bool
[src]

pub fn has_power_precise<P: Into<Position>>(&self, position: P) -> bool[src]

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

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

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

pub fn is_walkable<P: Into<WalkPosition>>(&self, wp: P) -> bool[src]

pub fn is_visible<P: Into<TilePosition>>(&self, tp: P) -> bool[src]

pub fn is_buildable<P: Into<TilePosition>>(&self, tp: P) -> bool[src]

pub fn is_explored<P: Into<TilePosition>>(&self, tp: P) -> bool[src]

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

pub fn is_flag_enabled(&self, flag: Flag) -> bool[src]

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

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

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

pub fn has_creep<P: Into<TilePosition>>(&self, tp: P) -> bool[src]

pub fn get_ground_height<P: Into<TilePosition>>(&self, tp: P) -> i32[src]

pub fn get_instance_number(&self) -> i32[src]

pub fn get_key_state(&self, key: Key) -> bool[src]

pub fn get_latency(&self) -> i32[src]

pub fn get_latency_frames(&self) -> i32[src]

pub fn get_latency_time(&self) -> i32[src]

pub fn get_mouse_position(&self) -> Position[src]

pub fn get_mouse_state(&self, button: MouseButton) -> bool[src]

pub fn neutral(&self) -> Player<'_>[src]

pub fn map_height(&self) -> i32[src]

pub fn map_width(&self) -> i32[src]

pub fn map_hash(&self) -> &str[src]

pub fn map_file_name(&self) -> &str[src]

pub fn map_path_name(&self) -> &str[src]

pub fn map_name(&self) -> &str[src]

pub fn observers(&self) -> Vec<Player<'_>>[src]

pub fn get_all_units(&self) -> &[Unit<'a>][src]

pub fn allies(&self) -> Vec<Player<'_>>[src]

pub fn get_bullets(&self) -> Vec<Bullet<'_>>[src]

pub fn get_client_version(&self) -> i32[src]

pub fn get_damage_from<P1: Into<Option<&'a Player<'a>>>, P2: Into<Option<&'a Player<'a>>>>(
    &self,
    from_type: UnitType,
    to_type: UnitType,
    from_player: P1,
    to_player: P2
) -> i32
[src]

pub fn get_damage_to<P1: Into<Option<&'a Player<'a>>>, P2: Into<Option<&'a Player<'a>>>>(
    &self,
    to_type: UnitType,
    from_type: UnitType,
    to_player: P2,
    from_player: P1
) -> i32
[src]

pub fn get_events(&self) -> Vec<BWAPIC_Event>[src]

pub fn get_force(&self, force_id: i32) -> Force<'_>[src]

pub fn get_forces(&self) -> Vec<Force<'_>>[src]

pub fn get_fps(&self) -> i32[src]

pub fn get_geysers(&self) -> Vec<Unit<'a>>[src]

pub fn enemy(&self) -> Option<Player<'_>>[src]

pub fn self_(&self) -> Option<Player<'_>>[src]

pub fn get_frame_count(&self) -> i32[src]

pub fn get_nuke_dots(&self) -> Vec<Position>[src]

pub fn get_random_seed(&self) -> u32[src]

pub fn get_remaining_latency_frames(&self) -> i32[src]

pub fn get_remaining_latency_time(&self) -> i32[src]

pub fn get_replay_frame_count(&self) -> i32[src]

pub fn get_revision(&self) -> i32[src]

pub fn get_screen_position(&self) -> Position[src]

pub fn get_start_locations(&self) -> Vec<TilePosition>[src]

pub fn get_units_in_radius<P: Into<Position>, Pred: IntoPredicate<Unit<'a>>>(
    &'a self,
    position: P,
    radius: i32,
    pred: Pred
) -> Vec<Unit<'_>>
[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Game<'a>[src]

impl<'a> !Send for Game<'a>[src]

impl<'a> !Sync for Game<'a>[src]

impl<'a> Unpin for Game<'a>[src]

impl<'a> !UnwindSafe for Game<'a>[src]

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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.