Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
カードをランダムにシャッフルするサンプル
void ShuffleCards(){
// カードをシャッフルする
for (int i = 0; i < cardList.Count; i++){
Card temp = cardList[i];
int randomIndex = Random.Range(0, cardList.Count);
cardList[i] = cardList[randomIndex];
cardList[randomIndex] = temp;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.