A basic code structure + the ball logic