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