So I wanted to be able to determine configurations and loadouts for my units and experiment with different enemies, so I wrote a program to simulate hand to hand fights between units in Warhammer.
Alright so my program is pretty much done, but there seems to be a problem with the random number generator I'm using in my code. I've thoroughly checked the program and can find no logic errors, yet when I run the following simulation:
Bretonnian MAAs vs. VC Skeletons
The Bretonnians will refuse to charge (fail leadership) 70% of the time when the Skeletons are wielding spears and 85% of the time when the Skeletons have a hand weapon...
And yet the Leadership test has nothing whatsoever to do with the defending unit's weapon choice...
I think what's happening is the cheesy random number generator that comes with .NET is somehow being influenced by this. Either that, or somehow I'm missing something in code.
Anybody have any ideas on where I can get a decent randomizer?
Alright so my program is pretty much done, but there seems to be a problem with the random number generator I'm using in my code. I've thoroughly checked the program and can find no logic errors, yet when I run the following simulation:
Bretonnian MAAs vs. VC Skeletons
The Bretonnians will refuse to charge (fail leadership) 70% of the time when the Skeletons are wielding spears and 85% of the time when the Skeletons have a hand weapon...
And yet the Leadership test has nothing whatsoever to do with the defending unit's weapon choice...
I think what's happening is the cheesy random number generator that comes with .NET is somehow being influenced by this. Either that, or somehow I'm missing something in code.
Anybody have any ideas on where I can get a decent randomizer?