fn update(&mut self, ctx: &mut ggez::Context) -> GameResult<()> {
        // If FPS is set to 0, then no rate-limiting
        if self.fps == 0 {
            // Advance the automaton state
            self.automaton.advance();
        
        // Otherwise refresh the graphics with the set FPS rate
        } else {
            // Wait for the FPS time to elapse
            while timer::check_update_time(ctx, self.fps) {
                // Advance the automaton state
                self.automaton.advance();
            }
        }

        // Return GameResult::Ok
        Ok(())
    }
/// A method that is called when the simulation update is triggered by the event loop
A method that is called when the simulation update is triggered by the event loop
A method that is called when the simulation update is triggered by the event loop
fn update(&mut self, ctx: &mut ggez::Context) -> GameResult<()> {
        // If FPS is set to 0, then no rate-limiting
        if self.fps == 0 {
            // Advance the automaton state
            self.automaton.advance();
        // Otherwise refresh the graphics with the set FPS rate
        } else {
            // Wait for the FPS time to elapse
            while timer::check_update_time(ctx, self.fps) {
                // Advance the automaton state
                self.automaton.advance();
            }
        }
        // Return GameResult::Ok
        Ok(())
    }
fn update ( & mut self , ctx : & mut ggez :: Context ) -> GameResult < ( ) > { // If FPS is set to 0, then no rate-limiting if self . fps == 0 { // Advance the automaton state self . automaton . advance ( ) ; // Otherwise refresh the graphics with the set FPS rate } else { // Wait for the FPS time to elapse while timer :: check_update_time ( ctx , self . fps ) { // Advance the automaton state self . automaton . advance ( ) ; } } // Return GameResult::Ok Ok ( ( ) ) }
A method that is called when the simulation update is triggered by the event loop
A method that is called when the simulation update is triggered by the event loop
&mut self
ctx
&mut ggez::Context
&mut self
ctx
&mut ggez::Context