/// <summary> /// Ready to start a new game. Shuffle/assign cards, initialize properties for one game /// </summary> public void GameOn() { // if no players are set, set up de-facto players if (Player1 == null) { Player1 = new Player("User Player"); } if (Player2 == null) { Player2 = new Player("Adversary"); } _deck = new CardDeck(); // distribute shuffled cards to players, 26 each List <List <Card> > subDecks = _deck.Cards.Select((x, i) => new { Index = i, Value = x }) .GroupBy(x => x.Index < 26) .Select(x => x.Select(v => v.Value).ToList()) .ToList(); Player1.AddCards(subDecks[0]); Player2.AddCards(subDecks[1]); _reshuffleCounter = 0; TotalRounds = 0; TotalWars = 0; }