CS 61A Ants Project Object Map
Insect [10]
Copyright By PowCoder代写 加微信 powcoder
* Class attributes
damage = 0
is_waterproof = False [10]
* Instance attributes
__init__(health, place)
action(gamestate)
add_to(place)
death_callback()
reduce_health(amount)
remove_from(place)
Bee [10][opt1][EC]
* Class attributes
name = ’Bee’
damage = 1
is_waterproof = True [10]
* Instance attributes
sting(ant)
move_to(place)
blocked(self) [opt1]
action(gamestate)
add_to(place)
remove_from(place)
slow(length) [EC]
scare(length) [EC]
apply_status(status,
previous_action, length) [EC]
Ant [8][opt1]
* Class attributes
blocks_path = True [opt1]
food_cost = 0
implemented = False
is_container = False
* Instance attributes
__init__(health)
add_to(place) [8]
can_contain(other)
store_ant(other)
remove_ant(other)
remove_from(place)
WallAnt [6]
* Class attributes
food_cost = 4 [6]
implemented = True [6]
name = ’Wall’ [6]
* Instance attributes
__init__(health) [6]
HungryAnt [7]
* Class attributes
chew_duration = 3 [7]
food_cost = 4 [7]
implemented ’True’ [7]
name = ’Hungry’ [7]
* Instance attributes
chew_countdown [7]
action(gamestate) [7]
FireAnt [5]
* Class attributes
damage = 3
food_cost = 5
implemented = True
name = ’Fire’
* Instance attributes
__init__(health)
reduce_health(amount) [5]
ThrowerAnt [1][3][4]
* Class attributes
damage = 1
food_cost = 3
implemented = True
max_range = ___ [4]
min_range = ___ [4]
name = ’Thrower’
* Instance attributes
action(gamestate)
nearest_bee(beehive) [3][4]
throw_at(target)
HarvesterAnt [1]
* Class attributes
food_cost = 2
implemented = True
name = ’Harvester’
* Instance attributes
action(gamestate) [1]
ContainerAnt [8]
* Class attributes
is_container = True
* Instance attributes
ant_contained
__init__(*args, **kwargs)
action(gamestate) [8]
can_contain(other) [8]
remove_ant(ant)
remove_from(place)
store_ant(ant) [8]
NinjaAnt [opt1]
* Class attributes
blocks_path = False [opt1]
damage = 1
food_cost = 5
implemented = True
name = ’Ninja’
* Instance attributes
action(gamestate) [opt1]
TankAnt [9]
* Class attributes
damage = 1 [9]
food_cost = 6 [9]
implemented = True [9]
name = ’Tank’ [9]
* Instance attributes
__init__(health) [9]
action(gamestate) [9]
BodyguardAnt [8]
* Class attributes
food_cost = 2
implemented = True [8]
name = ’Bodyguard’
* Instance attributes
__init__(health) [8]
SlowThrower [EC]
* Class attributes
food_cost = 4
implemented = True [EC]
name = ’Slow’ [EC]
* Instance attributes
throw_at(target) [EC]
ScaryThrower [EC]
* Class attributes
food_cost = 6
implemented = True [EC]
name = ’Scary’ [EC]
* Instance attributes
throw_at(target) [EC]
ScubaThrower [11]
* Class attributes
food_cost = 6 [11]
implemented = True [11]
is_waterproof = True [11]
name = ’Scuba’ [11]
* Instance attributes
LongThrower [4]
* Class attributes
food_cost = 2
implemented = True
min_range = 5 [4]
name = ’Long’
* Instance attributes
ShortThrower [4]
* Class attributes
food_cost = 2
implemented = True
max_range = 3 [4]
name = ’Short’
* Instance attributes
QueenAnt [12]
* Class attributes
food_cost = 7
implemented = True
name = ’Queen’
* Instance attributes
__init__(health) [12]
action(gamestate) [12]
reduce_health(amount) [12]
LaserAnt [opt2]
* Class attributes
food_cost = 10
implemented = True [opt2]
name = ’Laser’
* Instance attributes
action(gamestate)
calculate_damage(distance) [opt2]
insects_in_front(beehive) [opt2]
* Class attributes
* Instance attributes
is_hive = False
__init__(name, exit) [2]
add_insect(insect)
remove_insect(insect)
Water [10]
* Class attributes
* Instance attributes
add_insect(insect) [10]
Notes/legend
Please keep in mind that this diagram contains no
more information than what is available on the
project spec. A working implementation may make
use of helper methods that are not included in this
Orange indicates methods you must fill in and
instance variables you must set
Red indicates classes, methods, and instance
variables that you must implement from scratch
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com