diff --git a/src/Algorithm.rs b/src/Algorithm.rs index 7d40508..d4329aa 100644 --- a/src/Algorithm.rs +++ b/src/Algorithm.rs @@ -19,21 +19,6 @@ pub enum AlgoEnum{ impl Algorithm{ - pub fn start(length:i32, algorithm:u32) -> impl Generator{ - move ||{ - let mut generator = Algorithm::insertSort(length); - - match Pin::new(&mut generator).resume(()) { - GeneratorState::Yielded(x) => { - yield x - }, - GeneratorState::Complete(x) => { - } - } - } - - } - pub fn insertSort(length:i32) -> impl Generator{ let mut list = GuiVec::new(screen_width(), screen_height(), length); list.randomize(); diff --git a/src/main.rs b/src/main.rs index 4a45016..a612516 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,18 +18,8 @@ use crate::Algorithm::AlgoEnum; #[macroquad::main("BeepSort")] async fn main() { - - - - - - let mut finished = false; - let mut length = 100; - - - loop{ clear_background(WHITE); if root_ui().button(Vec2::new(screen_width()*0.2, 50.), "Increase"){