Added random generator. Refactored code to use random generator. Fixed bug which caused monsters to disappear instantly after spawn.

The bug was caused by truncating a double to an int.