Beispiel #1
0
        public string Move(Environment moveType)
        {
            string output = string.Empty;

            if (moveType == Environment.Air)
            {
                return(this.Fly());
            }
            else
            {
                output = Name + " is a Crow and can't move in " +
                         moveType.ToString() + " environment";
                return(output);
            }
        }
Beispiel #2
0
        public string Move(Environment moveType)
        {
            string output = string.Empty;

            if (moveType == Environment.Land)
            {
                return(this.Crawl());
            }
            else
            {
                output = Name + " is a Snake and can't move in " +
                         moveType.ToString() + " environment";
                return(output);
            }
        }
Beispiel #3
0
 public string Move(Environment moveType)
 {
     if (moveType == Environment.Land)
     {
         return(this.Walk());
     }
     else if (moveType == Environment.Air)
     {
         return(this.Fly());
     }
     else
     {
         string output = Name + " is a Partridge and can't move in " +
                         moveType.ToString() + " environment";
         return(output);
     }
 }
Beispiel #4
0
 public string Move(Environment moveType)
 {
     if (moveType == Environment.Land)
     {
         return(this.Walk());
     }
     else if (moveType == Environment.Watery)
     {
         return(this.Swim());
     }
     else
     {
         string output = Name + " is a Frog and can't move in " +
                         moveType.ToString() + " environment";
         return(output);
     }
 }