Created
June 26, 2018 12:58
-
-
Save todorok1/633b44518ae614904fc7a49069d552fb to your computer and use it in GitHub Desktop.
山札から何枚かのカードを手札に加えるサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DistributeFromDeckHead(int numRequired){ | |
// シャッフルされた山札の先頭からカードを配布する | |
playerCardList = new List<Card>(); | |
for (int i = 0; i < numRequired; i++){ | |
playerCardList.Add(cardList[i]); | |
} | |
// プレイヤーに配布したカードをリストから削除 | |
cardList.RemoveRange(0, numRequired); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment