public void RemoveStoppedPieces() { foreach (Int32 pieceKey in DelayRemoveStoppedPiecesKeys.Where(pieceKey => MovingPieces.ContainsKey(pieceKey))) { MovingPieces.Remove(pieceKey); } DelayRemoveStoppedPiecesKeys.Clear(); }
public void RemoveCapturedPieces() { foreach (Int32 pieceKey in DelayRemovePiecesKeys) { if (PawnsKeys.Contains(pieceKey)) { PawnsKeys.Remove(pieceKey); } if (MovingPieces.ContainsKey(pieceKey)) { MovingPieces.Remove(pieceKey); } AllPieces.Remove(pieceKey); } DelayRemovePiecesKeys.Clear(); }