-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
194 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Sorting Visualizer 📚 | ||
|
||
A lightweight sorting visualizer made with C++ and [SFML](https://www.sfml-dev.org/index.php). | ||
|
||
![Bubble sort](https://i.imgur.com/iFIRllR.png) <br> | ||
*Bubble sort* | ||
|
||
![Bubble sort info](https://i.imgur.com/lZL6G0a.png) <br> | ||
*Sort info* | ||
|
||
## Sort types 🗂️ | ||
- Bubble sort | ||
- Selection sort | ||
- Insertion sort | ||
|
||
## Usage 🕹️ | ||
**F1**: Change number of elements <br> | ||
**F2**: Change time between comparisons <br> | ||
**Arrow Up / Arrow down**: Change sort type <br> | ||
**Space**: Start sort <br> | ||
**Backspace**: Stop sort | ||
|
||
## Known issues ❗ | ||
- Program stops when a non existing sort type tries to be loaded | ||
|
||
## Download 🖨️ | ||
- Download pre-compiled exe from [Releases](https://github.com/alesbe/sorting-visualizer/releases). <br> | ||
**Note: The libraries are static, so they are all included in a single exe, in my case Windows detects this as something dangerous im not sure why, but you are free to compile the project yourself using the other options.** | ||
- Compile the project using the Visual Studio solution. | ||
- Compile the code yourself (if you have any SFML library related issue, follow [this](https://www.sfml-dev.org/tutorials/2.5/) guide). | ||
|
||
## License 📜 | ||
[MPL 2.0 License](https://www.mozilla.org/en-US/MPL/2.0/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "Utils.h" | ||
|
||
std::string Utils::getSortType(int sortType) { | ||
switch (sortType) | ||
{ | ||
case 0: | ||
return "Bubble sort"; | ||
|
||
case 1: | ||
return "Selection sort"; | ||
|
||
case 2: | ||
return "Insertion sort"; | ||
|
||
default: | ||
return std::to_string(sortType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
#include <string> | ||
|
||
namespace Utils | ||
{ | ||
std::string getSortType(int sortType); | ||
}; | ||
|
Oops, something went wrong.