50 lines
821 B
Rust
50 lines
821 B
Rust
/// The entire game state
|
|
|
|
#[derive (Clone, Default)]
|
|
pub struct State {
|
|
pub intro_state: IntroState,
|
|
pub current_room: RoomName,
|
|
pub room_1: StateRoom1,
|
|
pub room_sorting: StateSortingRoom,
|
|
}
|
|
|
|
#[derive (Clone, Copy)]
|
|
pub enum IntroState {
|
|
Stage1,
|
|
Stage2,
|
|
Stage3,
|
|
}
|
|
|
|
impl Default for IntroState {
|
|
fn default () -> Self {
|
|
Self::Stage1
|
|
}
|
|
}
|
|
|
|
#[derive (Clone)]
|
|
pub enum RoomName {
|
|
/// Starting room with the dead-simple note and keypad puzzle.
|
|
Room1,
|
|
/// Duplicate of starting room so I can change things around a little.
|
|
_Room2,
|
|
SortingRoom,
|
|
}
|
|
|
|
impl Default for RoomName {
|
|
fn default () -> Self {
|
|
Self::Room1
|
|
}
|
|
}
|
|
|
|
#[derive (Clone, Default)]
|
|
pub struct StateRoom1 {
|
|
pub detected_keypad: bool,
|
|
pub detected_note: bool,
|
|
pub read_note: bool,
|
|
}
|
|
|
|
#[derive (Clone, Default)]
|
|
pub struct StateSortingRoom {
|
|
|
|
}
|