一連の質問がありますが、これらの質問のいくつかは同じである可能性があります。
{"choice":"attributes","text":"Happy"},
{"choice":"attributes","text":"Fun"},
{"choice":"attributes","text":"Enjoyable"},
{"choice":"attributes","text":"Pleasurable"},
{"choice":"attributes","text":"Ecstatic"},
{"choice":"attributes","text":"Sad"},
{"choice":"attributes","text":"Tedious"},
{"choice":"attributes","text":"Annoying"},
{"choice":"attributes","text":"Depressing"},
{"choice":"attributes","text":"Unhappy"},
{"choice":"attributes","text":"Happy"},
{"choice":"attributes","text":"Fun"},
{"choice":"attributes","text":"Enjoyable"},
現時点では、FisherYatesShuffle() を使用して配列をランダム化していますが、シャッフル後にリストを調べて、連続する 2 つの項目が同じでないことを確認する必要があります。
例:私たちは決して得ません
{"choice":"attributes","text":"Happy"},
{"choice":"attributes","text":"Happy"},
編集していくつかの質問を解決してください。配列内のすべての項目を保持する必要があります。