Back to Parent

random(4) = starting position
[choose one of the four corners of the room to start on]

random(90) = starting direction
[choose a direction to start on]

while(!isObstacle(starting position && "hasString")) {

    while(!isObstacle(starting position) && "hasString") {

        moveStep(starting position, starting direction) = starting position;

    }

    //isObstacle(starting position)

    tapeString(obstacle(starting position));

    bounceDirection(starting direction, obstacle(starting position)) = starting direction;

}

tapeString(obstacle(starting position));
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0