static void Main() { Array suits = Enum.GetValues(typeof(Suit)); int [] nums = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; PlayingCard [] deck = new PlayingCard [suits.Length * nums.Length + 2]; int i = 0; // index for deck AFs <PlayingCard> afs = new AFs <PlayingCard>(); // deck の中身を詰める。 foreach (Suit s in suits) { foreach (int n in nums) { deck[i] = new NormalCard(s, n); i++; } } deck[i] = new JokerCard("!"); deck[i + 1] = new JokerCard("?"); // 遊ぶ。 Console.WriteLine(afs.to_s(deck)); afs.shuffle(deck); Console.WriteLine(afs.to_s(deck)); }
static void Main() { Array suits = Enum.GetValues(typeof(Suit)); int [] nums = { 1,2,3,4,5,6,7,8,9,10,11,12,13 }; PlayingCard [] deck = new PlayingCard [ suits.Length * nums.Length + 2 ]; int i = 0; // index for deck AFs<PlayingCard> afs = new AFs<PlayingCard>(); // deck の中身を詰める。 foreach(Suit s in suits) { foreach(int n in nums) { deck[i] = new NormalCard(s,n); i++; } } deck[i ] = new JokerCard("!"); deck[i+1] = new JokerCard("?"); // 遊ぶ。 Console.WriteLine( afs.to_s(deck) ); afs.shuffle(deck); Console.WriteLine( afs.to_s(deck) ); }