CSc 110, Autumn 2016 Lecture 32: Critters Adapted

CSc 110, Autumn 2016 Lecture 32: Critters Adapted
1 / 1
CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 1 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 2 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 3 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 4 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 5 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 6 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 7 of 8 CSc 110, Autumn 2016 Lecture 32: Critters Adapted - slide 8 of 8
CSc 110, Autumn 2016 Lecture 32: Critters Adapted from slides by Marty Stepp and Stuart Reges CSc 110 Critters Ant Bird Hippo Vulture WildCat (creative) behavior: eat eating food fight animal fighting getcolor color to display getmove

Related Topics

Download this presentation From Below

"CSc 110, Autumn 2016 Lecture 32: Critters Adapted" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

01
CSc 110, Autumn 2016 Lecture 32: Critters
Adapted from slides by Marty Stepp and Stuart Reges<br>
02
CSc 110 Critters Ant
Bird
Hippo
Vulture
WildCat (creative)

behavior:
eat eating food
fight animal fighting
get_color color to display
get_move movement
__str__ letter to display<br>
03
A Critter subclass class name(Critter):

class Critter:
def eat()
# returns True or False
def fight(opponent)
# ROAR, POUNCE, SCRATCH
def get_color()
# returns a hex string
def get_move()
# returns NORTH, SOUTH, EAST, WEST, CENTER
def __str__()<br>