So I've been playing around in Python and using __init__
etc.
Now I was wondering if you could do something else that would execute a piece of code (basically jump to that part of code) when triggered.
Easiest way to make it clear I think is like when a player in a game dies, he should just die and not get any more chances of having a turn or whatever.
I know this can be done in other ways, but the point is this may not always be nice.
I was thinking of something like (note: this is completely made up):
__as-soon-as__ PlayerHealth < 1: ## End what you are doing and do this when PlayerHealth is less than 1##
print('Game Over')
So the real question is: Does anything like this exist?