Design question: at the moment, a creep notices it is breached and sets a flag. The game needs to process a breach (deduct live, etc), but the game does not know the creeps. The wave knows the creeps and can detect a (newly) breached creep.
Option one: flag in the wave. negative: double flagging and twice detection (wave and game)
Option two: register a callback (in the game) with the creep. pro: would be an active call. negative: currently the creep generator is a lambda, so is another thing to do after creation, and the wave does not know the game, so the game would have to register the callback at the wave as well. again, double passing.
Option three: ??
Design question: at the moment, a creep notices it is breached and sets a flag. The game needs to process a breach (deduct live, etc), but the game does not know the creeps. The wave knows the creeps and can detect a (newly) breached creep.
Option one: flag in the wave. negative: double flagging and twice detection (wave and game)
Option two: register a callback (in the game) with the creep. pro: would be an active call. negative: currently the creep generator is a lambda, so is another thing to do after creation, and the wave does not know the game, so the game would have to register the callback at the wave as well. again, double passing.
Option three: ??