Exemplo n.º 1
0
        public string Move(Environment environment)
        {
            string result = null;

            if (environment == Environment.Land)
            {
                result = Crawl();
            }
            else
            {
                result = this.Name + " is a Snake " + "and can't move in " + environment + " environment";
            }
            return(result);
        }
Exemplo n.º 2
0
        public string Move(Environment environment)
        {
            string result = null;

            if (environment == Environment.Air)
            {
                result = Fly();
            }
            else
            {
                result = this.Name + " is a Crow " + "and can't move in " + environment + " environment";
            }
            return(result);
        }
Exemplo n.º 3
0
        public string Move(Environment environment)
        {
            string result = null;

            if (environment == Environment.Air)
            {
                result = this.Name + " is a Frog " + "and can't move in " + environment + " environment";
            }
            else if (environment == Environment.Land)
            {
                result = Walk();
            }
            else
            {
                result = Swim();
            }

            return(result);
        }