In another question, you helped me to build a simulation algorithm for soccer. I got some very good answers there. Thanks again!
Now I\'ve coded this algorithm. I would
How often are these values going to be checked? If it's going to be in use by a lot of people and constantly recursing over those if/else statements, I can see you eating up a lot of memory and running quite slowly.
Perhaps you could but a few switches in there to replace some of the if's?
That's all I can see for speed improvement. As for the algorithm itself, I'll have to peruse over that a bit later if no one else does.