(map_id, map_name, map_path) = random.choice(self.game_service.ladder_maps)
game = LadderGame(self.game_service.createUuid(), self.game_service, self.game_stats_service)
self.game_service.games[game.id] = game
player1.game = game
player2.game = game
game.map_file_path = map_path
Almost all module functions depend on the basic function random(), which generates a random float uniformly in the semi-open range [0.0, 1.0). Python uses the Mersenne Twister as the core generator. It produces 53-bit precision floats and has a period of 2**19937-1. The underlying implementation in C is both fast and threadsafe. The Mersenne Twister is one of the most extensively tested random number generators in existence. However, being completely deterministic, it is not suitable for all purposes, and is completely unsuitable for cryptographic purposes.
Statistics: Posted by ThomasHiatt — 04 Nov 2017, 21:41
Statistics: Posted by Morax — 04 Nov 2017, 20:46
Statistics: Posted by PhilipJFry — 13 Oct 2017, 07:42
Statistics: Posted by Mephi — 06 Oct 2017, 17:32
Statistics: Posted by Evan_ — 06 Oct 2017, 17:17