Robot Challenge: Stay in Ring Advanced

Challenge Description
Robot Challenge Description: Stay in Ring Advanced
– eBot is on a SUMO ring either white with a black ring or black with a white ring and must stay inside the ring using the both the LHS & RHS light sensors and backing off the line in the opposite direction of the light sensor that detects the line.
Code the eBot sprite so that eBot behaves as below:
– continuously moves without stopping for more than 1 second
– always stays inside the black ring
– never drives completely over the black ring line
– moves as fast as possible
– randomly changes direction both forwards and backwards
– reverses first when over the black line so that it’s back end doesn’t go outside the black ring
– reverses away from the black line in the opposite direction of the light sensor that detects the black line eg reverse right if left light sensor detects line