24 lines
452 B
C++
24 lines
452 B
C++
#include <iostream>
|
|
#include <string>
|
|
|
|
#include "API.h"
|
|
|
|
void log(const std::string& text) {
|
|
std::cerr << text << std::endl;
|
|
}
|
|
|
|
int main(int argc, char* argv[]) {
|
|
log("Running...");
|
|
API::setColor(0, 0, 'G');
|
|
API::setText(0, 0, "abc");
|
|
while (true) {
|
|
if (!API::wallLeft()) {
|
|
API::turnLeft();
|
|
}
|
|
while (API::wallFront()) {
|
|
API::turnRight();
|
|
}
|
|
API::moveForward();
|
|
}
|
|
}
|