Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
code battles are cool!!!
#2
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():

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


Messages In This Thread
code battles are cool!!! - by melex750 - 09-08-2015, 02:01 PM
RE: code battles are cool!!! - by tomaszkax86 - 09-08-2015, 02:53 PM
RE: code battles are cool!!! - by Simbax - 09-08-2015, 03:31 PM
RE: code battles are cool!!! - by tomangelo - 09-08-2015, 03:52 PM
RE: code battles are cool!!! - by RaptorParkowsky - 09-08-2015, 04:45 PM
RE: code battles are cool!!! - by melex750 - 09-08-2015, 06:42 PM
RE: code battles are cool!!! - by krzys_h - 09-08-2015, 08:07 PM
RE: code battles are cool!!! - by melex750 - 09-09-2015, 09:09 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)