public void turn() { while (!SETfinder.set_finder(table)) { addCARD(); } }
void card_Tapped(object sender, TappedRoutedEventArgs e) { if (!this.isHit) { this.isHit = true; karakib.PlayTimeSet.Add(this); base.Opacity = 0.5; if (karakib.PlayTimeSet.Count == 3) { if (SETfinder.isSet(karakib.ArrayToSet(karakib.PlayTimeSet))) { foreach (CARD item in karakib.PlayTimeSet) { Grid G = (Grid)item.Parent; G.Children.Remove(item); Point x = new Point(Grid.GetRow(item), Grid.GetColumn(item)); karakib.d.places.Enqueue(x); karakib.d.table.Remove(item); } karakib.d.turn(); } else { foreach (var item in karakib.PlayTimeSet) { item.Opacity = 1; item.isHit = false; } } karakib.EmptyList(); } } else { this.Opacity = 1; this.isHit = false; karakib.PlayTimeSet.Remove(this); } }