Struct sc2::GameState [] [src]

pub struct GameState {
    pub player_id: u32,
    pub previous_step: u32,
    pub current_step: u32,
    pub camera_pos: Point2,
    pub units: Vec<Rc<Unit>>,
    pub power_sources: Vec<PowerSource>,
    pub effects: Vec<Effect>,
    pub upgrades: Vec<Upgrade>,
    pub minerals: u32,
    pub vespene: u32,
    pub food_cap: u32,
    pub food_used: u32,
    pub food_army: u32,
    pub food_workers: u32,
    pub idle_worker_count: u32,
    pub army_count: u32,
    pub warp_gate_count: u32,
    pub larva_count: u32,
    pub score: Score,
}

state of the game (changes every frame)

Fields

the player id associated with the participant

the previous game step

the current game step

position of the center of the camera

a list of all known units at the moment

all power sources associated with the current player

all active effects in vision of the current player

all upgrades

current mineral count

current vespene count

the total supply cap given the players max supply

the total supply used by the player

the total supply consumed by army units alone

the total supply consumed by workers alone

the number of workers that currently have no orders

the number of army units

the number of warp gates owned by the player

the number of larva owned by the player

detailed current set of scores

Methods

impl GameState
[src]

[src]

filter all units based on a custom condition

[src]

check if the given point contains creep

[src]

get the visibility of the given point for the current player

[src]

whether the given point on the terrain is pathable

this does not include pathing blockers like structures, for more accurate pathing results, use query interface

[src]

whether the given point on the terrain is buildable

this does not include blockers like other structures. for more accurate building placement results, use query interface

[src]

returns the terrain height of the given point

Trait Implementations

impl Debug for GameState
[src]

[src]

Formats the value using the given formatter.

impl Clone for GameState
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more