GameHandler.RemoveCount C# (CSharp) Méthode

RemoveCount() public static méthode

public static RemoveCount ( int id, int n, Hashtable ht ) : int
id int
n int
ht Hashtable
Résultat int
    public static int RemoveCount(int id, int n, Hashtable ht)
    {
        int count = GameHandler.GetCount(id, ht);
        if(ht.ContainsKey(id))
        {
            ht.Remove(id);
        }
        count -= n;
        if(count > 0)
        {
            ht.Add(id, count);
        }
        return count;
    }
GameHandler