Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: alesbe/sorting-visualizer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1
Choose a base ref
...
head repository: alesbe/sorting-visualizer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on May 15, 2022

  1. Update README.md

    alesbe authored May 15, 2022
    Copy the full SHA
    ba8b1dc View commit details
  2. Update README.md

    alesbe authored May 15, 2022
    Copy the full SHA
    cc2e6b9 View commit details
  3. Update README.md

    alesbe authored May 15, 2022
    Copy the full SHA
    f7f1267 View commit details
  4. Update README.md

    alesbe authored May 15, 2022
    Copy the full SHA
    72e13ce View commit details
  5. Copy the full SHA
    986b2ee View commit details
  6. Copy the full SHA
    ae1b5f4 View commit details

Commits on May 23, 2022

  1. Added install_sfml function to install sfml from package manager wh…

    …en run as root,
    
    and call it in `compile` if sfml was not already found on the system.
    Updated `compile` function to use `g++` directly rather than the
    Makefile
    bazuin-32 committed May 23, 2022
    Copy the full SHA
    2a3b8df View commit details
  2. Merge pull request #9 from bazuin-32/main

    Added `install_sfml` function to install sfml from package manager wh…
    alesbe authored May 23, 2022
    Copy the full SHA
    472fd6b View commit details
  3. Copy the full SHA
    717ec61 View commit details
  4. Updated linux install steps

    alesbe committed May 23, 2022
    Copy the full SHA
    191eda4 View commit details
  5. Copy the full SHA
    9c12afe View commit details
  6. Included sfml libraries to project to compile them if the packet mana…

    …ger can't find them
    alesbe committed May 23, 2022
    Copy the full SHA
    8bba292 View commit details
  7. Removed share folder

    alesbe committed May 23, 2022
    Copy the full SHA
    16ab832 View commit details
  8. Copy the full SHA
    82613fa View commit details
  9. Copy the full SHA
    f923fd9 View commit details
  10. Added void linux support

    alesbe committed May 23, 2022
    Copy the full SHA
    d9d25b7 View commit details
  11. Copy the full SHA
    8ce3db1 View commit details
  12. Copy the full SHA
    a85d29d View commit details
  13. Fixed typo

    alesbe committed May 23, 2022
    Copy the full SHA
    4014265 View commit details
  14. Added contribute info

    alesbe committed May 23, 2022
    Copy the full SHA
    ad0f8e7 View commit details
  15. Fixed contribute info typo

    alesbe committed May 23, 2022
    Copy the full SHA
    75034d6 View commit details
  16. Copy the full SHA
    ad456d3 View commit details
  17. Copy the full SHA
    ce8adf2 View commit details
  18. Added CMake

    alesbe committed May 23, 2022
    Copy the full SHA
    80669d0 View commit details
  19. Fixed CMake

    alesbe committed May 23, 2022
    Copy the full SHA
    9de51c6 View commit details
  20. Modified install.sh to use CMake with local libraries instead of usin…

    …g the package manager
    alesbe committed May 23, 2022
    Copy the full SHA
    4699571 View commit details
  21. Fixed install.sh identations

    alesbe committed May 23, 2022
    Copy the full SHA
    bc21613 View commit details
  22. Copy the full SHA
    e8791a8 View commit details
  23. Fixed typo

    alesbe committed May 23, 2022
    Copy the full SHA
    255ec71 View commit details

Commits on May 24, 2022

  1. Update README.md

    alesbe authored May 24, 2022
    Copy the full SHA
    a68c76d View commit details
  2. Copy the full SHA
    8cb46f6 View commit details
  3. Copy the full SHA
    3542c1f View commit details

Commits on May 25, 2022

  1. Resolved #13. Made cmake build in a subdirectory, rather than in the …

    …project root.
    
    Also added this subdirectory to `.gitignore`, and removed entries
    in `.gitignore` that are no longer needed.
    bazuin-32 committed May 25, 2022
    Copy the full SHA
    036b79e View commit details
  2. Merge pull request #14 from bazuin-32/main

    Resolved #13. Made cmake build in a subdirectory, rather than in the project root.
    
    Also added this subdirectory to `.gitignore`, and removed entries
    in `.gitignore` that are no longer needed.
    alesbe authored May 25, 2022
    Copy the full SHA
    b2206a9 View commit details

Commits on May 26, 2022

  1. Update README.md

    alesbe authored May 26, 2022
    Copy the full SHA
    933cfd2 View commit details
  2. Update README.md

    alesbe authored May 26, 2022
    Copy the full SHA
    94c1055 View commit details
  3. Copy the full SHA
    203d830 View commit details
  4. Copy the full SHA
    54eaac8 View commit details
  5. Updated version info

    alesbe committed May 26, 2022
    Copy the full SHA
    16a1c74 View commit details
  6. Updated randomize function

    alesbe committed May 26, 2022
    Copy the full SHA
    e851707 View commit details

Commits on May 27, 2022

  1. Update README.md

    alesbe authored May 27, 2022
    Copy the full SHA
    e71b0b5 View commit details
  2. Update issue templates

    alesbe authored May 27, 2022
    Copy the full SHA
    76d7d70 View commit details
  3. Update issue templates

    alesbe authored May 27, 2022
    Copy the full SHA
    04b02b8 View commit details
  4. Update issue templates

    alesbe authored May 27, 2022
    Copy the full SHA
    76b85b8 View commit details
  5. Removed issues info

    alesbe authored May 27, 2022
    Copy the full SHA
    2c98ef3 View commit details

Commits on Jun 3, 2022

  1. Copy the full SHA
    7ec44e4 View commit details
  2. Merge pull request #17 from BlueSkeleton/add-cocktail-sort

    Added working cocktail shaker sort
    alesbe authored Jun 3, 2022
    Copy the full SHA
    02c6eac View commit details
  3. Update README.md

    alesbe authored Jun 3, 2022
    Copy the full SHA
    194b39f View commit details
  4. Update README.md

    alesbe authored Jun 3, 2022
    Copy the full SHA
    f6f3cb3 View commit details
  5. Update README.md

    alesbe authored Jun 3, 2022
    Copy the full SHA
    9eb83b8 View commit details
Showing with 26,747 additions and 590 deletions.
  1. +25 βˆ’0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +17 βˆ’0 .github/ISSUE_TEMPLATE/documentation.md
  3. +14 βˆ’0 .github/ISSUE_TEMPLATE/feature_request.md
  4. +2 βˆ’1 .gitignore
  5. +45 βˆ’0 CMakeLists.txt
  6. +0 βˆ’43 Makefile
  7. +62 βˆ’26 README.md
  8. +0 βˆ’164 SortAlgorithms.cpp
  9. +0 βˆ’14 SortAlgorithms.h
  10. +0 βˆ’110 SortController.cpp
  11. +0 βˆ’40 SortController.h
  12. +25 βˆ’28 install.sh
  13. +56 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio.hpp
  14. +70 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/AlResource.hpp
  15. +48 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/Export.hpp
  16. +263 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/InputSoundFile.hpp
  17. +234 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/Listener.hpp
  18. +337 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/Music.hpp
  19. +133 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/OutputSoundFile.hpp
  20. +264 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/Sound.hpp
  21. +352 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundBuffer.hpp
  22. +144 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundBufferRecorder.hpp
  23. +197 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundFileFactory.hpp
  24. +100 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundFileFactory.inl
  25. +165 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundFileReader.hpp
  26. +125 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundFileWriter.hpp
  27. +408 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundRecorder.hpp
  28. +332 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundSource.hpp
  29. +405 βˆ’0 lib/SFML-2.5.1/include/SFML/Audio/SoundStream.hpp
  30. +236 βˆ’0 lib/SFML-2.5.1/include/SFML/Config.hpp
  31. +74 βˆ’0 lib/SFML-2.5.1/include/SFML/GpuPreference.hpp
  32. +68 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics.hpp
  33. +215 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/BlendMode.hpp
  34. +154 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/CircleShape.hpp
  35. +275 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Color.hpp
  36. +153 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/ConvexShape.hpp
  37. +126 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Drawable.hpp
  38. +48 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Export.hpp
  39. +439 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Font.hpp
  40. +227 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Glsl.hpp
  41. +155 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Glsl.inl
  42. +79 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Glyph.hpp
  43. +324 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Image.hpp
  44. +58 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/PrimitiveType.hpp
  45. +254 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Rect.hpp
  46. +159 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Rect.inl
  47. +132 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/RectangleShape.hpp
  48. +174 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/RenderStates.hpp
  49. +510 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/RenderTarget.hpp
  50. +314 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/RenderTexture.hpp
  51. +291 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/RenderWindow.hpp
  52. +875 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Shader.hpp
  53. +355 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Shape.hpp
  54. +279 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Sprite.hpp
  55. +513 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Text.hpp
  56. +733 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Texture.hpp
  57. +479 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Transform.hpp
  58. +429 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Transformable.hpp
  59. +148 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/Vertex.hpp
  60. +223 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/VertexArray.hpp
  61. +408 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/VertexBuffer.hpp
  62. +343 βˆ’0 lib/SFML-2.5.1/include/SFML/Graphics/View.hpp
  63. +43 βˆ’0 lib/SFML-2.5.1/include/SFML/Main.hpp
  64. +53 βˆ’0 lib/SFML-2.5.1/include/SFML/Network.hpp
  65. +48 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/Export.hpp
  66. +616 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/Ftp.hpp
  67. +482 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/Http.hpp
  68. +328 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/IpAddress.hpp
  69. +532 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/Packet.hpp
  70. +219 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/Socket.hpp
  71. +57 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/SocketHandle.hpp
  72. +263 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/SocketSelector.hpp
  73. +166 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/TcpListener.hpp
  74. +316 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/TcpSocket.hpp
  75. +291 βˆ’0 lib/SFML-2.5.1/include/SFML/Network/UdpSocket.hpp
  76. +78 βˆ’0 lib/SFML-2.5.1/include/SFML/OpenGL.hpp
  77. +60 βˆ’0 lib/SFML-2.5.1/include/SFML/System.hpp
  78. +117 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Clock.hpp
  79. +80 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Err.hpp
  80. +48 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Export.hpp
  81. +169 βˆ’0 lib/SFML-2.5.1/include/SFML/System/FileInputStream.hpp
  82. +152 βˆ’0 lib/SFML-2.5.1/include/SFML/System/InputStream.hpp
  83. +139 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Lock.hpp
  84. +148 βˆ’0 lib/SFML-2.5.1/include/SFML/System/MemoryInputStream.hpp
  85. +148 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Mutex.hpp
  86. +62 βˆ’0 lib/SFML-2.5.1/include/SFML/System/NativeActivity.hpp
  87. +129 βˆ’0 lib/SFML-2.5.1/include/SFML/System/NonCopyable.hpp
  88. +52 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Sleep.hpp
  89. +669 βˆ’0 lib/SFML-2.5.1/include/SFML/System/String.hpp
  90. +53 βˆ’0 lib/SFML-2.5.1/include/SFML/System/String.inl
  91. +282 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Thread.hpp
  92. +90 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Thread.inl
  93. +103 βˆ’0 lib/SFML-2.5.1/include/SFML/System/ThreadLocal.hpp
  94. +158 βˆ’0 lib/SFML-2.5.1/include/SFML/System/ThreadLocalPtr.hpp
  95. +77 βˆ’0 lib/SFML-2.5.1/include/SFML/System/ThreadLocalPtr.inl
  96. +488 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Time.hpp
  97. +763 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Utf.hpp
  98. +752 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Utf.inl
  99. +301 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Vector2.hpp
  100. +161 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Vector2.inl
  101. +302 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Vector3.hpp
  102. +168 βˆ’0 lib/SFML-2.5.1/include/SFML/System/Vector3.inl
  103. +58 βˆ’0 lib/SFML-2.5.1/include/SFML/Window.hpp
  104. +119 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Clipboard.hpp
  105. +195 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Context.hpp
  106. +149 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/ContextSettings.hpp
  107. +222 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Cursor.hpp
  108. +284 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Event.hpp
  109. +48 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Export.hpp
  110. +109 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/GlResource.hpp
  111. +227 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Joystick.hpp
  112. +232 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Keyboard.hpp
  113. +177 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Mouse.hpp
  114. +150 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Sensor.hpp
  115. +137 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Touch.hpp
  116. +228 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/VideoMode.hpp
  117. +622 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/Window.hpp
  118. +101 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/WindowHandle.hpp
  119. +53 βˆ’0 lib/SFML-2.5.1/include/SFML/Window/WindowStyle.hpp
  120. +148 βˆ’0 lib/SFML-2.5.1/lib/cmake/SFML/SFMLConfig.cmake
  121. +86 βˆ’0 lib/SFML-2.5.1/lib/cmake/SFML/SFMLConfigDependencies.cmake
  122. +46 βˆ’0 lib/SFML-2.5.1/lib/cmake/SFML/SFMLConfigVersion.cmake
  123. +59 βˆ’0 lib/SFML-2.5.1/lib/cmake/SFML/SFMLSharedTargets-release.cmake
  124. +159 βˆ’0 lib/SFML-2.5.1/lib/cmake/SFML/SFMLSharedTargets.cmake
  125. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-audio.so
  126. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-audio.so.2.5
  127. BIN lib/SFML-2.5.1/lib/libsfml-audio.so.2.5.1
  128. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-graphics.so
  129. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-graphics.so.2.5
  130. BIN lib/SFML-2.5.1/lib/libsfml-graphics.so.2.5.1
  131. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-network.so
  132. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-network.so.2.5
  133. BIN lib/SFML-2.5.1/lib/libsfml-network.so.2.5.1
  134. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-system.so
  135. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-system.so.2.5
  136. BIN lib/SFML-2.5.1/lib/libsfml-system.so.2.5.1
  137. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-window.so
  138. +1 βˆ’0 lib/SFML-2.5.1/lib/libsfml-window.so.2.5
  139. BIN lib/SFML-2.5.1/lib/libsfml-window.so.2.5.1
  140. +0 βˆ’152 main.cpp
  141. +397 βˆ’0 src/SortAlgorithms.cpp
  142. +19 βˆ’0 src/SortAlgorithms.h
  143. +219 βˆ’0 src/SortController.cpp
  144. +65 βˆ’0 src/SortController.h
  145. +2 βˆ’2 { β†’ src}/Sortable.cpp
  146. +1 βˆ’1 { β†’ src}/Sortable.h
  147. +20 βˆ’8 { β†’ src}/Utils.cpp
  148. +1 βˆ’1 { β†’ src}/Utils.h
  149. +168 βˆ’0 src/main.cpp
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]: <replace me>"
labels: bug, needs triage
assignees: ''

---

## Describe you problem:
*replace me*

## Steps to reproduce (optional):
*replace me*

## Additional info (optional):
*replace me*

## Possible fix (optional):
*replace me*

## OS
- [ ] : Windows
- [ ] : Mac OS
- [x] : Linux
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Documentation
about: Suggest a change in the documentation
title: "[DOC]: <replace me>"
labels: documentation, needs triage
assignees: ''

---

## Which part of the documentation?
- [x] Wiki
- [ ] Readme
- [ ] Code comments
- [ ] Others

# Describe your suggestion
*replace me*
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEAT]: <replace me>"
labels: enhancement, needs triage
assignees: ''

---

## Feature description:
*replace me*

## Additional info (optional):
*replace me*
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
sorting-visualizer
sorting-visualizer
build/
45 changes: 45 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 3.22)
project(sorting-visualizer)

set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message( STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

set(SFML_DIR "C:/Program Files (x86)/SFML/lib/cmake/SFML")

find_package(SFML COMPONENTS graphics window CONFIG REQUIRED)

add_executable(sorting-visualizer src/main.cpp src/Sortable.cpp src/SortAlgorithms.cpp src/SortController.cpp src/Utils.cpp)

target_link_libraries(sorting-visualizer sfml-graphics sfml-window)

# Copy across .dlls for windows users
get_target_property(SFML_TYPE sfml-graphics TYPE)
if(SFML_TYPE STREQUAL "SHARED_LIBRARY")
message(STATUS "Copying sfml-graphics DLLs to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
add_custom_command(
TARGET sorting-visualizer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:sfml-graphics>
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)

message(STATUS "Copying sfml-window DLLs to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
add_custom_command(
TARGET sorting-visualizer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:sfml-window>
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)

message(STATUS "Copying sfml-system DLLs to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
add_custom_command(
TARGET sorting-visualizer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:sfml-system>
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)
endif()

43 changes: 0 additions & 43 deletions Makefile

This file was deleted.

88 changes: 62 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,73 @@
# Sorting Visualizer πŸ“š
# πŸ“Š 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*
| ![Quick sort gif](https://i.imgur.com/TsWwumg.gif) |
|:--:|
| *Quick sort* |

![Bubble sort info](https://i.imgur.com/lZL6G0a.png) <br>
*Sort info*
| ![Bubble visualizer](https://i.imgur.com/086SZ51.png) |
|:--:|
| *Bubble sort* |

## I want to contribute to the project! πŸ“–
If you want to contibute or understand the code better, go to the Wiki tab or press [here](https://github.com/alesbe/sorting-visualizer/wiki)!
| ![Bubble sort info](https://i.imgur.com/P5ypw86.png) |
|:--:|
| *Bubble sort info* |

## Sort types πŸ—‚οΈ
- Bubble sort
- Selection sort
- Insertion sort
- Quick sort
## πŸ“– I want to contribute to the project!
Awesome! [Here](https://github.com/alesbe/sorting-visualizer/wiki) you can find some useful info about the visualizer, we accept first contributors too!

## Usage πŸ•ΉοΈ
**h**: Display help <br>
**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
*Also, make sure to pull the last changes from [dev](https://github.com/alesbe/sorting-visualizer/tree/dev) branch!*

## Download πŸ–¨οΈ
- Pre-compiled .exe (windows) [Releases](https://github.com/alesbe/sorting-visualizer/releases). <br>
**Note: The libraries are static, so they are all included in a single exe, some browsers may detect this as a possible threat, feel free to compile it yourself instead of downloading the pre-compiled exe!**
## πŸ—‚οΈ Sort types
- **Bubble sort**
- Bubble sort works by continuously swapping elements next to each other that are in the wrong place. Starting from the beginning of the dataset, each element 'floats' to its correct spot. More on Bubble sort can be found [here](https://www.geeksforgeeks.org/bubble-sort/).
- **Selection sort**
- Selection sort works by having two sections, the sorted and unsorted sections, and continuously search through the unsorted section and place the smallest element into the sorted section. This sorting algorithm could be implemented where the largest element is selected instead. More on selection sort can be found [here](https://www.geeksforgeeks.org/selection-sort/).
- **Insertion sort**
- Insertion sort is similar to selection sort in that they both have a sorted and unsorted section. Instead of continuously selected the smallest/largest element, it will insert a selected element from the unsorted portion and 'insert' it into the correct spot in the sorted section. More on insertion sort can be found [here](https://www.geeksforgeeks.org/insertion-sort/).
- **Quick sort**
- Quick sort is a "Divide and Conquer" algorithm. Divide and Conquer algorithms work by splitting the problem into smaller portions, solving the smaller problems, then combing the solutions into one final solution. Quick sort works by choosing an element as a 'pivot', moving the other elements around where elements less than the pivot are on one side and elements greater than the pivot are on the other, then continuously doing that process with each side. Once each element has been partitioned, the solution is combined into the sorted array. More on quick sort can be found [here](https://www.geeksforgeeks.org/quick-sort/) and more on Divide and Conquer algorithms can be found [here](https://www.geeksforgeeks.org/introduction-to-divide-and-conquer-algorithm-data-structure-and-algorithm-tutorials/).
- **Cocktail shaker sort**
- Cocktail shaker sort is a variant of Bubble Sort. Instead of only having elements 'float' from the bottom to its correct spot in the dataset, elements also 'sink' from the top of the datset into its correct position. More on cocktail shaker sort can be found [here](https://www.geeksforgeeks.org/cocktail-sort/).
- **Bogo sort**
- Bogo sort is an inefficient sorting algorithm where it randomly generates different versions of the original dataset and checks if it's sorted or not. More on bogo sort can be found [here](https://www.geeksforgeeks.org/bogosort-permutation-sort/).
- **Bitonic sort**
- Bitonic sort is a comparison based sorting algorithm that can be run with parallel implementation. Within different subarrays, the algorithm checks if the first element is smaller than the second and vice versa. It continuously does that on larger subarrays until the whole dataset is sorted. More on bitonic sort can be found [here](https://www.geeksforgeeks.org/bitonic-sort/).
- **Odd-Even sort**
- Odd-Even sort is comparassion vased sorting algorithm developed for use on pararell processors, its based on bubble sort but is divided into two phases Odd and Even Phase. On Odd phase algorithm performs bubble sort on odd indexed elements, during even phase on even indexed elements. More on Odd-Even sort can be found [here](https://www.geeksforgeeks.org/odd-even-sort-brick-sort/).

or

- Compile the code yourself (linux/macos) (Follow [this](https://github.com/alesbe/sorting-visualizer/wiki/How-to-compile-compile-the-project) guide).
## πŸ•ΉοΈ Usage
- **Space**: Start sort <br>
- **Backspace**: Stop sort <br>
- **h**: Display help <br>
- **F1**: Change number of elements <br>
- **F2**: Change time between comparisons <br>
- **Arrow Up / Arrow down**: Change sort type <br>

## License πŸ“œ
[MIT License](https://github.com/alesbe/sorting-visualizer/blob/main/LICENSE)
## πŸ–¨οΈ Download
**Requirements:**
- CMake

### 🐧 Linux
- Clone the project: `git clone https://github.com/alesbe/sorting-visualizer && cd sorting-visualizer`
- Run `./install.sh`

### πŸ–₯️ Windows / MacOS
#### [Download from releases](https://github.com/alesbe/sorting-visualizer/releases/)

If you want to compile the project by yourself you need to follow the next steps:
1. Download SFML from the [official website](https://www.sfml-dev.org/download/sfml/2.6.1/)
2. Download [CMake](https://cmake.org/download/)
3. Clone the repository
4. Open `CMakeLists.txt` and locate the variable `SFML_DIR`. Set the path to the route where the SFML CMake files are located. For instance `C:/Program Files (x86)/SFML/lib/cmake/SFML`.
5. From the root directory of the repository, run:
```
mkdir build cd build
cmake ..
cmake -G 'Visual Studio 17 2022' ..
```
6. In the `/build` directory should be a Visual Studio solution. Now you can open the solution and compile the file with the play button as usual!

_Note: If you don't want to use Visual Studio 2022, download SFML for your target compiler and change the cmake generator in step 6. You can check the list of generators with cmake -G_
Loading