From dc9411cf9d32fe78dd6847a2edaac28d70f8e763 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Sun, 8 Dec 2024 12:10:14 +0100 Subject: [PATCH] update todo list, print real time taken when level is completed --- README.md | 27 ++++++++++++++------------- src/editor.rs | 4 ++++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e3c4c18..5d53374 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,20 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble ## todo -(more levels) -story/lore -copy/cut/paste selections -timestamps in solutions and blueprints -multiple input/output sets -undo/redo -tooltips -show level info in editor -lock tile types for early levels to make it less overwhelming -display tool variant more clearly (it's not obvious there are more states) -make marble movement more consistent (`>o o<` depends on internal marble order) -decide on marble data size (u32 or byte?) -blueprint rotation? +- copy/cut/paste selections +- undo/redo +- more levels +- make marble movement symmetric and order-independent +- make power propagation not recursive +- story/lore +- timestamps in solutions and blueprints +- multiple input/output sets +- tooltips +- show level info in editor +- lock tile types for early levels to make it less overwhelming +- display tool variant more clearly (it's not obvious there are more states) +- option to use 8-bit marbles? +- blueprint rotation? ## file hierarchy ``` diff --git a/src/editor.rs b/src/editor.rs index 90f2b29..b353cd2 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -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 {