Extending your game
Your game now works, however if you’re not watching, a player can cheat the game, as it doesn’t make them go back to the start after they lose. To make your game cheat proof you need to detect when the game has been won, and also have a way to reset the game when it has been won or lost.
To do this you need to connect up some of CodeBugs other legs.
Push a croc-clip into each base (with part of the metal clip showing).
Connect the other ends of these two croc-clips to a different leg on CodeBug (use leg 3 for the start/reset and 2 for the end, like in the diagram below).
Make sure these new connections are not touching your wavy course, because this will cause your program to behave strangely.