9dbc24efc1
split timeractions from timers into seperate header integrated the experiments into an improved displaynumbers, which includes the vector as well as bars above them outsourced the calculation of delta time to the manager to clean up main()
33 lines
655 B
C++
33 lines
655 B
C++
#ifndef TIMERACTIONS_HPP
|
|
#define TIMERACTIONS_HPP
|
|
|
|
#include "timer.hpp"
|
|
#include <chrono>
|
|
#include <cstddef>
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <ncurses.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class swapaction : public timeraction {
|
|
public:
|
|
size_t it_i = 0;
|
|
bool iscomplete = false;
|
|
std::vector<int> &input_vector;
|
|
swapaction(std::vector<int> &input_vector);
|
|
void update(const timer &t);
|
|
};
|
|
|
|
class sortaction : public timeraction {
|
|
public:
|
|
size_t it_i = 0;
|
|
size_t it_j = 0;
|
|
bool iscomplete = false;
|
|
std::vector<int> &input_vector;
|
|
sortaction(std::vector<int> &input_vector);
|
|
void update(const timer &t);
|
|
};
|
|
|
|
#endif
|