Ejemplo n.º 1
0
    /// <summary>
    /// Determine if Cats are fighting
    /// </summary>
    /// <param name="furColor"></param>
    /// <param name="eyeColor"></param>
    /// <returns></returns>
    public bool determineFight(Cat.FurOptions furColor, Cat.EyeOptions eyeColor)
    {
        switch (furColor)
        {
        case Cat.FurOptions.BLACK:
            if (eyeColor.Equals(Cat.EyeOptions.BLUE))
            {
                this.blackCatBlueEyes = true;
            }
            else if (eyeColor.Equals(Cat.EyeOptions.BROWN))
            {
                this.blackCatBrownEyes = true;
            }
            else if (eyeColor.Equals(Cat.EyeOptions.GREEN))
            {
                this.blackCatGreenEyes = true;
            }
            break;

        case Cat.FurOptions.BROWN:
            this.brownCatsCount++;
            break;

        case Cat.FurOptions.GREY:
            this.greyCatsCount++;
            break;
        }

        if ((this.greyCatsCount > this.brownCatsCount) && this.brownCatsCount > 0)
        {
            return(true);
        }

        if (blackCatBlueEyes && blackCatBrownEyes && blackCatGreenEyes)
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 2
0
 // Set UI text to show cat description
 private void SetCatDescription(Cat.FurOptions fur, Cat.EyeOptions eyes)
 {
     CatTextManager.description = fur.ToString() + " Cat " + eyes.ToString() + " Eyes";
 }