const string bobbycar_forward = "f";
const string bobbycar_left = "l";
const string bobbycar_right = "r";
+ const string bobbycar_backward = "b";
+
+ uint8_t bobbycar_reversing = 254;
+ royale::Vector<royale::String> boobycar_reversing_script ={"s","b","b","b","r","r","r","r","r","r","b","b"};
public :
void naiveObstacleAvoidanceDemo()
{
+ if (bobbycar_reversing<boobycar_reversing_script.size()) {
+ std::cout << boobycar_reversing_script.at(bobbycar_reversing++) << std::endl;
+ return;
+ }
+
+
bool free_paths[num_dist_columns_];
if (naiveIsObstaclePresent(free_paths))
{
} else {
// std::cout << "STOP" << std::endl;
std::cout << bobbycar_stop << std::endl;
+ bobbycar_reversing = 0;
}
} else {
std::cout << bobbycar_forward << std::endl;