private void ClearPieceAt(List <GamePiece> gamePieces, List <GamePiece> bombedPieces) { foreach (GamePiece piece in gamePieces) { if (piece != null) { int bonus = 0; if (gamePieces.Count >= 4) { bonus = 5 * gamePieces.Count; } piece.ScorePoints(scoreMultiplier, bonus); ClearPieceAt(piece.XIndex, piece.YIndex); if (particleManager != null) { if (bombedPieces.Contains(piece)) { particleManager.BombFxAt(piece.XIndex, piece.YIndex); } else { particleManager.ClearPieceFxAt(piece.XIndex, piece.YIndex); } } } } }