Barrier a = (Barrier) getOneIntersectingObject(Barrier.class);
if(a != null) {
setLocation(262, 123);
return;
// Sets the location back to the start if the car bumps into a wall
Barrier a = (Barrier) getOneIntersectingObject(Barrier.class);
if(a != null) {
setLocation(262, 123);
return;
// Sets the location back to the start if the car bumps into a wall
}
Finish b = (Finish) getOneIntersectingObject(Finish.class);
if (b != null) {
Player1 player1 = new Player1();
// This code Was barrowed:ChuckNorrisCode
getWorld().addObject(player1,453,159);
// end barrowed code
// Sets the Victory screen to pop up once you encounter the finish line, and then stop greenfoot