You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Program stops when a non existing sort type tries to be loaded
25
+
26
+
## Download 🖨️
27
+
- Download pre-compiled exe from [Releases](https://github.com/alesbe/sorting-visualizer/releases). <br>
28
+
**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.**
29
+
- Compile the project using the Visual Studio solution.
30
+
- Compile the code yourself (if you have any SFML library related issue, follow [this](https://www.sfml-dev.org/tutorials/2.5/) guide).
Copy file name to clipboardExpand all lines: SortController.cpp
+33-12Lines changed: 33 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
#include"SortController.h"
2
-
#include<iostream>
3
-
#include<SFML/System.hpp>
2
+
#include"Utils.h"
4
3
5
4
SortController::SortController(sf::Vector2u windowSize, int timeSleep) {
6
5
this->winWidth = windowSize.x;
@@ -21,7 +20,7 @@ void SortController::clear() {
21
20
22
21
voidSortController::populate(int numOfElements) {
23
22
for (int n = 0; n < numOfElements; n++) {
24
-
Sortable sortable(((float)winWidth / numOfElements), ((float)winHeight / numOfElements) * (n+1), n); // Width defined to space max space in window, height defined by Sortable value
23
+
Sortable sortable(((float)winWidth / numOfElements), ((float)winHeight / numOfElements) * (n+1), n); // Width defined for max space in window, height defined by element value
0 commit comments