/// <summary> /// Determines if this object equals the given object. /// </summary> /// <param name="s">The object to compare.</param> /// <returns>Whether this object equals the given object.</returns> public bool Equals(Symbol s) { // If parameter is null return false: if (s == null) { return false; } // Return true if the fields match: return (Name == s.Name) && (Id == s.Id); }
/// <summary> /// Initializes a new instance of the <see cref="ReelSymbol"/> class. /// </summary> /// <param name="symbol">The symbol.</param> /// <param name="weight">The weight of the symbol.</param> public ReelSymbol(Symbol symbol, int weight = 1) { Symbol = symbol; Weight = weight; }
/// <summary> /// Initializes a new instance of the <see cref="Symbol"/> class. /// </summary> /// <param name="other">The symbol to copy.</param> public Symbol(Symbol other) { Id = other.Id; Name = other.Name; }
/// <summary> /// Add a symbol to the reel strip. /// </summary> /// <param name="symbol">The symbol.</param> /// <param name="weight">The weight of the symbol.</param> public void AddSymbol(Symbol symbol, int weight = 1) { Strip.Add(new ReelSymbol(symbol, weight)); }