Struct sc2::Observation
[−]
[src]
pub struct Observation { /* fields omitted */ }
state of the game (changes every frame)
Methods
impl Observation
[src]
pub fn get_player_id(&self) -> u32
[src]
the player id associated with the participant
pub fn get_previous_step(&self) -> u32
[src]
the previous game step
pub fn get_current_step(&self) -> u32
[src]
the current game step
pub fn get_camera_pos(&self) -> Point2
[src]
position of the center of the camera
pub fn get_units(&self) -> &[Rc<Unit>]
[src]
a list of all known units at the moment
pub fn get_power_sources(&self) -> &[PowerSource]
[src]
all power sources associated with the current player
pub fn get_effects(&self) -> &[Effect]
[src]
all active effects in vision of the current player
pub fn get_upgrades(&self) -> &[Upgrade]
[src]
all upgrades
pub fn get_minerals(&self) -> u32
[src]
current mineral count
pub fn get_vespene(&self) -> u32
[src]
current vespene count
pub fn get_food_cap(&self) -> u32
[src]
the total supply cap given the players max supply
pub fn get_food_used(&self) -> u32
[src]
the total supply used by the player
pub fn get_food_army(&self) -> u32
[src]
the total supply consumed by army units alone
pub fn get_food_workers(&self) -> u32
[src]
the total supply consumed by workers alone
pub fn get_idle_worker_count(&self) -> u32
[src]
the number of workers that currently have no orders
pub fn get_army_count(&self) -> u32
[src]
the number of army units
pub fn get_warp_gate_count(&self) -> u32
[src]
the number of warp gates owned by the player
pub fn get_larva_count(&self) -> u32
[src]
the number of larva owned by the player
pub fn get_creep(&self) -> &ImageData
[src]
creep image (sample pixels to find tiles with creep)
pub fn get_visibility(&self) -> &ImageData
[src]
visibility image (sample pixels to find visible tiles)
pub fn get_score(&self) -> &Score
[src]
detailed current set of scores
pub fn filter_units<F>(&self, filter: F) -> Vec<Rc<Unit>> where
F: Fn(&Unit) -> bool,
[src]
F: Fn(&Unit) -> bool,
filter all units based on a custom condition
pub fn sample_creep(&self, _: Point2) -> bool
[src]
check if the given point contains creep
pub fn sample_visibility(&self, _: Point2) -> Visibility
[src]
get the visibility of the given point for the current player
Trait Implementations
impl Debug for Observation
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Observation
[src]
fn clone(&self) -> Observation
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more