PDA

View Full Version : Bumper Cars Chp7 Ex. 6


gsbatch1
11-23-2009, 08:08 AM
I am using the Learning to Program with Alice 2nd Edition, and Im working with the exercises in the book. I am trying to figure out the Bumper cars Chp 7 Ex. 6. I have gotten the 4 cars in the bumper cars object. I have gotten the cars to move forward and not hit the edge of the ring using the while distance within, but I can not figure out how to combine that with moving around without hitting the other cars. Any help would be appreciated.

kylefwlr
11-23-2009, 08:12 AM
just make an if else loop and place a if --- within (make a new one for every different car) else --- do nothing, like if it comes so close to another car or the wall move 2 meters away from that object