cleanup
This commit is contained in:
parent
0e5ab853a6
commit
d529a1c184
2 changed files with 0 additions and 25 deletions
|
@ -19,21 +19,6 @@ pub enum AlgoEnum{
|
|||
|
||||
impl Algorithm{
|
||||
|
||||
pub fn start(length:i32, algorithm:u32) -> impl Generator<Yield=GuiVec, Return=()>{
|
||||
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<Yield=GuiVec, Return=()>{
|
||||
let mut list = GuiVec::new(screen_width(), screen_height(), length);
|
||||
list.randomize();
|
||||
|
|
10
src/main.rs
10
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"){
|
||||
|
|
Loading…
Reference in a new issue