public void TestForClear(int x, int y) { CopyBoard(); collector.Clear(); // Only the currently moved block can trigger a clear TestBlock(x, y); // Destroy blocks if we matched 3 of a kind if (collector.Count >= 3) { SoundBoard.PlayBlockMatch(); // Destroy all the blocks while (collector.Count > 0) { ClearBlock(collector[0], true); collector.RemoveAt(0); } } // Finish testing this block currentlyTesting = null; collector.Clear(); }