Comments (17)
Related #88
- Maybe get rid of the 'sort' name part in each algorithm. This would, I think, make the selection of algorithm more readable.
- Else, make sure all algorithm names end with 't' (Some names may be too long to display?)
from sorting-algorithms-visualizer.
You can see my commit. 78c164c
My idea is melting:
If the data in display.sizeBox or display.algorithmBox is not correct. The egg color changes to red.
But I have one problem. I don't know how to change the color in the display.sizeBox.
from sorting-algorithms-visualizer.
Hey. I made the selection red, you can see it in my branch.
https://github.com/Mikhaylov-yv/Sorting-Algorithms-Visualizer/tree/error_checking
from sorting-algorithms-visualizer.
@Mikhaylov-yv There are a lot to improve but i already did some changes! I rewrote the class for input boxes, especially in the method that updates the boxes values and I made the play button an instance of InputBox! The main.py is much cleaner to read, i hope :).
I made the seletion red as well, for that i just change the color atribute for the input boxes inside the error_checking function that you implemented!
I would appreciate if you could give me a feedback
from sorting-algorithms-visualizer.
@LucasPilla I believe this works great
from sorting-algorithms-visualizer.
When installing on Windows I get the following error.
C:\Users\steve\Sorting-Algorithms-Visualizer>pip install -r requirements.txt
Collecting pygame==1.9.6
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\steve\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame\setup.py'"'"'; file='"'"'C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\steve\AppData\Local\Temp\pip-pip-egg-info-0dd9hpg2'
cwd: C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\steve\AppData\Local\Temp\pip-install-hyaxeunf\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\users\steve\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
from sorting-algorithms-visualizer.
@LucasPilla It worked after I ran pip install pygame
, which installed 'pygame-2.0.1-cp39-cp39-win_amd64.whl'. When trying to install from requirements.txt it attempted to intsall pygame-1.9.6.tar.gz which I really doubt works with windows. Thanks for the help.
from sorting-algorithms-visualizer.
I see your problem, I did the module for these input Boxes a time ago and there are a lot of harded code. When i have a time I will improve this module in a way that you can easily access the box properties, e.g. sizeBox.color = some_color.
By the way your idea is a simple and good way to alert errors.
from sorting-algorithms-visualizer.
It seems that display.py references the wrong folders for playButton and stopButton.
It references data/..
But should reference images/..
from sorting-algorithms-visualizer.
I forgot to change, thanks for remenbering
See if its working now
from sorting-algorithms-visualizer.
Thanks, there are some problems but the error alert is working! I still want to remake the code for input boxes so the code keeps clear and simple!
from sorting-algorithms-visualizer.
yes, it also seems to me that the code has become worse to read.
from sorting-algorithms-visualizer.
@prmurphy I think the problem is related to python and ygame versions that are not compatible.
Try installing pygame this way: pip install pygame
and let me know if it worked.
from sorting-algorithms-visualizer.
@prmurphy Both ways, specifying or not the version, worked for me.
I am on Windows as well. Which version of python are you using?
from sorting-algorithms-visualizer.
@prmurphy Great! Thanks for reporting this error, as a temporary and simple solution i will remove the version specification from requirements.txt.
from sorting-algorithms-visualizer.
When you run bogosort, if you hit the 'stop' button the program freezes. I'm not exactly sure how the 'stop' button works, so I dont know what's causing this.
from sorting-algorithms-visualizer.
@prmurphy Actually the stop button stops the drawing, this makes the process faster.
Because bogosort is an "algorithm" extremely eneficient, it takes forever to finish.
I forgot to mention this issue, it could be fixed adding a flag to abort the algorithm.
from sorting-algorithms-visualizer.
Related Issues (20)
- Redesign Menu Field HOT 9
- Implement [Exchange Sort]
- Implement [Insertion Sort]
- Implement Patience Sort HOT 2
- Implement Scroll Menu HOT 5
- Implement Double Selection Sort HOT 4
- Compress GIFs HOT 9
- Organize repo HOT 2
- Implement Tree Sort HOT 1
- Update algorithms options HOT 11
- Bogo sort not working properly HOT 4
- Add some docstrings / comments explainning each sorting algorithm HOT 13
- Suggestion : Displaying the values of the bars for better visualization and understanding HOT 8
- Implementing time taken to sort HOT 4
- Bug: Exchange sort throws TypeError HOT 1
- Improve the algorithm selection dropdown HOT 2
- Improve main.py and remove hardcoded values from display.py HOT 5
- BUG: TimSort Algorithm does not finish the sorting
- Bug: sizeBox should not allow null input HOT 1
- Delay, algorithm, and play/stop buttons are too responsive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sorting-algorithms-visualizer.