I've been wondering how to do configurable logic in a game. I realized I could just give each function a number (let's say, 3 is "spawnExplosion"), put those numbers in an array with a list of arguments and the next in the chain, and have something to sort through that and actually run the functions with the appropriate arguments.
Does anyone see any obvious problems with this? (IF would point at two different locations based on true/false, of course.)