| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef SIMULATOR_H
- #define SIMULATOR_H
- #include <array>
- #include <vector>
- #include <memory>
- #include <climits>
- #include <stdint.h>
- using namespace std;
- #include "program.h"
- enum {
- CYCLE_TIMEOUT = 100000,
- FIELDS_XY = 20,
- };
- struct Simulator {
- size_t cycle = 0;
- vector<Program> programs;
- Simulator();
- Position calcPosition(Position position, Direction direction, int32_t distance);
- void loadProgram(QColor color, size_t x, size_t y);
- Program* findProgram(Position position);
- void simulate();
- };
- #endif // SIMULATOR_H
|