public void SelectCard(int i) { memory.FlipCard(memory.Cards[i - 1]); memory.Score(memory.Cards[i - 1], player); UpdateScreen(); int j = 0; foreach (var card in memory.Cards) { if (card.Flipped && !card.PairFound) { j++; } } if (j == 2) { WaitToFlipCardTimer.Start(); } }
private void WaitToFlipCardTimer_Tick(object sender, EventArgs e) { memory.UnflipCards(); UpdateScreen(); WaitToFlipCardTimer.Stop(); }