Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            WheelSymbolList other = (WheelSymbolList)obj;

            if (other != null)
            {
                if (Count != other.Count)
                {
                    return(false);
                }

                for (int index = 0; index < other.Count; index++)
                {
                    if (other[index] != this[index])
                    {
                        return(false);
                    }
                }

                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Check if the given wheel symbols match the symbol/count pair,
 /// i.e. do the wheel symbols contain "count" instances of "symbol"
 /// </summary>
 /// <param name="symbols"></param>
 /// <returns></returns>
 public bool Match(WheelSymbolList symbols)
 {
     return(symbols.Symbols.FindAll(wheelSymbol => wheelSymbol == _symbol).Count == Count);
 }