pub struct GameState {
pub seed: u64,
pub world: World,
pub player_club: ClubId,
pub schedule: Vec<Fixture>,
pub date: GameDate,
pub current_matchday: u8,
pub last_matchday: u8,
pub results: BTreeMap<FixtureId, (u8, u8)>,
pub pending_lineup: Option<Lineup>,
pub last_lineup: Option<Lineup>,
pub champion: Option<ClubId>,
}Fields§
§seed: u64§world: World§player_club: ClubId§schedule: Vec<Fixture>§date: GameDate§current_matchday: u81-based matchday about to be played next. last_matchday + 1 once over.
last_matchday: u8§results: BTreeMap<FixtureId, (u8, u8)>§pending_lineup: Option<Lineup>The human’s submitted lineup for the upcoming matchday, if any.
last_lineup: Option<Lineup>The lineup most recently used, reused as the default next time.
champion: Option<ClubId>Implementations§
Source§impl GameState
impl GameState
Sourcepub fn replay(events: &[Event]) -> GameState
pub fn replay(events: &[Event]) -> GameState
Rebuild state from the log. Panics on a malformed log (an empty log or
one not starting with GameStarted) — that is a corrupted save, not a
recoverable game situation.
pub fn season_over(&self) -> bool
pub fn fixtures_of_matchday( &self, matchday: u8, ) -> impl Iterator<Item = &Fixture>
Trait Implementations§
impl StructuralPartialEq for GameState
Auto Trait Implementations§
impl Freeze for GameState
impl RefUnwindSafe for GameState
impl Send for GameState
impl Sync for GameState
impl Unpin for GameState
impl UnsafeUnpin for GameState
impl UnwindSafe for GameState
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