09-08-2015, 02:53 PM
I like this feature. This would simplify a lot of things. However, we would need to introduce some kind of control in CBot. My proposal for move():
Negative values would mean opposite direction, so -2.0 to the right would mean 2.0 to the left and such. Direction defaults to Front. We could add similar parameters to motor() and other movement functions.
We need approval of other members.
Code:
move(distance, direction);
move(2.0); // moves 2 meters forward
move(2.0, Front); // moves 2 meters forward
move(2.0, Back); // moves 2 meters backward
move(2.0, Left); // moves 2 meters to the left
move(2.0, Right); // moves 2 meters to the right
Negative values would mean opposite direction, so -2.0 to the right would mean 2.0 to the left and such. Direction defaults to Front. We could add similar parameters to motor() and other movement functions.
We need approval of other members.
"After three days without programming, life becomes meaningless."
~The Tao of Programming
~The Tao of Programming