moved global random variable for EM engine to game structure