Random pattern generation for the game