simple code. Touch the dragon to bounce off, and if you touch the line press the flag 3 times to restart. (it may get repetitive if it doesn't bounce off the other wall.)