|
@@ -223,29 +223,6 @@ void Simulator::decodeInstructionParameters(Program& program, Task& task, const
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Simulator::loadProgram(QColor color, size_t x, size_t y) {
|
|
|
|
|
- shared_ptr<Team> team = make_shared<Team>(color);
|
|
|
|
|
- teams.push_back(team);
|
|
|
|
|
-
|
|
|
|
|
- programs.push_back(Program(team, Right, Position{x, y}, 2, 50, 1));
|
|
|
|
|
- ++team->programCount;
|
|
|
|
|
-
|
|
|
|
|
- programs.back().banks[0] = make_shared<Bank>(team, vector<Instruction>{
|
|
|
|
|
- Instruction(BJUMP, LL, 1, 0)
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- programs.back().banks[1] = make_shared<Bank>(team, vector<Instruction>{
|
|
|
|
|
- Instruction(SCAN, V, 1),
|
|
|
|
|
- Instruction(CREATE, LLL, 2, 50, 1),
|
|
|
|
|
- Instruction(TRANS, LL, 1, 1),
|
|
|
|
|
- Instruction(TRANS, LL, 2, 2),
|
|
|
|
|
- Instruction(SET, VL, RemoteActive, 1),
|
|
|
|
|
- Instruction(TURN, L, 0),
|
|
|
|
|
- Instruction(AJUMP, L, 0)
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- programs.back().active = team->id;
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
Program* Simulator::findProgram(Position position) {
|
|
Program* Simulator::findProgram(Position position) {
|
|
|
for(auto& program : programs) {
|
|
for(auto& program : programs) {
|