diff --git a/src/main.cpp b/src/main.cpp index ec706e7..95d7133 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,6 +84,12 @@ int main() system(CLEAR); std::cout << "Sort changed to: " << Utils::getSortType(sortType) << std::endl; } + else { + //Go to the first sorting algorithm + sortType = 0; + system(CLEAR); + std::cout << "Sort changed to " << Utils::getSortType(sortType) << std::endl; + } break; // Change sort type (decrease) @@ -93,6 +99,16 @@ int main() system(CLEAR); std::cout << "Sort changed to: " << Utils::getSortType(sortType) << std::endl; } + else { + //Go to the last sorting algorithm + while(Utils::hasNextSortType(sortType)) + { + sortType++; + } + + system(CLEAR); + std::cout << "Sort changed to: " << Utils::getSortType(sortType) << std::endl; + } break; // Change number of elements