LucasPilla / Sorting-Algorithms-Visualizer

Program made with Python and Pygame module for visualizing sorting algorithms
MIT License
426 stars 165 forks source link

[Bug] Pausing certain algorithms causes the app to freeze #100

Closed ghost closed 3 years ago

ghost commented 3 years ago

I don't really have much to say. It just seems that pausing Bogo Sort during it's execution freezes the app everytime, using pygame 2.0.1. I couldn't replicate this behaviour with other algorithms.

LucasPilla commented 3 years ago

@GuerreiroSpiral Actually the red button stops drawing, but the sorting is still hapenning. Then, when finished, the sorted array is drawn, this makes the process faster which looks like the sorting was aborted. The problem here is that 'bogosort' isnt a proper sorting algorithm, so it keeps sorting forever. I was to fix it, so the sorting really stops, but i intend to make other changes before.

ghost commented 3 years ago

Got it, thanks for clarifying.

bdanzig commented 3 years ago

Hi, I'd like to fix the BogoSort so that it doesn't loop infinitely by pausing the sort after a set time period should an input be too large to finish reasonably. Can I take care of that? Looks like this issue is still open.

LucasPilla commented 3 years ago

@bdanzig Hey, thanks for contributing. I will have a look to yours commits.