update todo list, print real time taken when level is completed
This commit is contained in:
parent
78027aaaa0
commit
dc9411cf9d
2 changed files with 18 additions and 13 deletions
|
@ -64,6 +64,7 @@ pub struct Editor {
|
|||
blueprint_scroll: usize,
|
||||
step_time: u128,
|
||||
max_step_time:u128,
|
||||
start_time: Instant
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
@ -141,6 +142,7 @@ impl Editor {
|
|||
blueprint_scroll: 0,
|
||||
step_time: 0,
|
||||
max_step_time: 0,
|
||||
start_time: Instant::now(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,6 +168,7 @@ impl Editor {
|
|||
|
||||
fn start_sim(&mut self) {
|
||||
self.max_step_time = 0;
|
||||
self.start_time = Instant::now();
|
||||
self.machine.reset();
|
||||
self.machine.set_board(self.source_board.clone());
|
||||
}
|
||||
|
@ -193,6 +196,7 @@ impl Editor {
|
|||
&& self.complete_popup == Popup::Start
|
||||
{
|
||||
self.complete_popup = Popup::Visible;
|
||||
println!("completed in {:?}", self.start_time.elapsed());
|
||||
self.exit_state = ExitState::Save;
|
||||
self.sim_state = SimState::Stepping;
|
||||
self.score = Some(Score {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue