Generates bombs and makes sure the game is winnable.