end conditions

Split success/fail conditions into separate game logic (thread) and
script. Reimplement success condition.