This was a group project (4 people) in the first half of the second year. We needed to make an endless runner. With a randomly generated map. I programmed everything except for the map generation.
Here is a code snippet of the CheckForFlip function. Its uses a Raycast to check if the player is upside and give some points as a reward for doing a flip.