Doomsday game algorythm