20. Click Circle Questions
Brief explanation of how to stop animations and show a win screen.
Main questions about the click circle project (20.6.4):
Stopping an animation
Stop condition | How? |
---|---|
user action | return (stop-with model) from a handler |
model state | (stop-when ...) in big-bang |
Win screen
Question: How do you make a win screen show?
Answer: There are three steps:
- Write a
win-draw-handler
function. - Write a
should-stop?
function. This is a technical annoyance. For now this can do nothing:
(define (should-stop? model)
false)
- Add a
(stop-when should-stop? win-draw-handler)
clause to yourbig-bang
.