HomeWildfire Games

Unify random integer and float helper functions of GUI, Simulation and AI.

Description

Unify random integer and float helper functions of GUI, Simulation and AI.

Patch By: bb
Differential Revision: D121
Refs: #4326

Removes the Random.js simulation helper and randomFloat function of the random map scripts library.
Adds randomIntInclusive and randomIntExclusive to make the calls more readable and fix and prevent off-by-one mistakes.
Adds randBool and use it in an AI occurance. It will be used in many places by the random map scripts.
Use the pickRandom function introduced in r19109 in more applicable occurances.
Replace remaining occurances of Math.random() with the new functions to easily test completeness.

Cleanup of the random map script functions will come in a separate commit.

Details