mirror of
https://github.com/koloideal/SortLab.git
synced 2026-08-08 18:11:16 +03:00
skelet
This commit is contained in:
+15
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user