This commit is contained in:
2026-03-05 10:35:31 +03:00
parent 11b118b3bf
commit 5a942f935f
10 changed files with 447 additions and 3 deletions
+15
View File
@@ -4,6 +4,9 @@
#include "sorters/InsertionSorter.hpp"
#include "sorters/MergeSorter.hpp"
#include "sorters/QuickSorter.hpp"
#include "sorters/HeapSorter.hpp"
#include "sorters/ShellSorter.hpp"
#include "sorters/RadixSorter.hpp"
App::App()
: window_(sf::VideoMode(1600, 900), "SortLab")
@@ -97,6 +100,18 @@ void App::handleEvents() {
switchSorter(std::make_unique<QuickSorter>());
break;
case sf::Keyboard::Num6:
switchSorter(std::make_unique<HeapSorter>());
break;
case sf::Keyboard::Num7:
switchSorter(std::make_unique<ShellSorter>());
break;
case sf::Keyboard::Num8:
switchSorter(std::make_unique<RadixSorter>());
break;
case sf::Keyboard::R:
array_.shuffle();
array_.resetStates();