Exemplo n.º 1
0
 public override bool Equals(object other)
 {
     //Check for null and compare run-time types.
     if ((other == null) || !this.GetType().Equals(other.GetType()))
     {
         return(false);
     }
     else
     {
         Candy c = (Candy)other;
         return((this.candyName == c.GetCandyName()) && (this.candyColour == c.GetCandyColour()));
     }
 }
Exemplo n.º 2
0
 public string ToString()
 {
     return("TimedCandy: " + candy.GetCandyName() + " " + candy.GetCandyColour() + " " + spawnRate + " " + waitTime);
 }