Commit e15ec0bf by nschroeder1771

### Added a doctest to the super harvesterand changed the values of the start of the game.

parent f281013b
 ... ... @@ -297,7 +297,14 @@ class SuperHarvester(Harvester): def act(self, game_state): """ A Super Harvest produces more food than a Harvest for the colony. A Super Harvester produces two food for the colony per turn. >>> ant_place = ColonyPlace(0,0) >>> state = GameState(places=[ant_place], queen_place=None, ant_archetypes=[], food=0) >>> ant = SuperHarvester(unit_type=None, food_cost=0, health=5, production=2) >>> ant_place.add_insect(ant) >>> ant.act(state) >>> state.food 2 """ super().act(game_state) ... ... @@ -305,6 +312,13 @@ class SuperHarvester(Harvester): """ In order for a super harvester to live it must have a leaf thrower next to it. """ place = self.place left_place = self.left_place right_place = self.right_place top_place = self.top_place bottom_place = self.bottom_place # Need help on how to do this, I can't seem to figure it out class Thrower(Ant): ... ... @@ -485,8 +499,8 @@ class Thrower(Ant): >>> ant_place = ColonyPlace(1, 0) >>> bee1_place = ColonyPlace(0, 0) >>> bee2_place = ColonyPlace(6, 7) >>> ant_place.connect_to(bee_place) >>> state = GameState(places=[ant_place, bee_place], queen_place=None, ant_archetypes=[], food=0) >>> ant_place.connect_to(bee1_place) >>> state = GameState(places=[ant_place, bee1_place, bee2_place], queen_place=None, ant_archetypes=[], food=0) >>> ant = Thrower(unit_type=None, food_cost=0, health=5, damage=1, ammo= 4, minimum_range=0, maximum_range=2) >>> ant_place.add_insect(ant) >>> bee1 = Bee(health=4, damage=1, delay=0) ... ... @@ -573,6 +587,8 @@ class WallAnt(Ant): The wall ant must be next to another ant in order to survive. """ # Same situation as the Super Harvester, need help on how to do this. class GameOutcome(Enum): """ ... ... @@ -687,8 +703,8 @@ STANDARD_ANT_ARCHETYPES = ( ) def make_standard_game(radius=4, wave_count=4, wave_size=2, wave_growth=1, wave_interval=5, bee_health=4, bee_damage=1, ant_archetypes=STANDARD_ANT_ARCHETYPES, food=15): def make_standard_game(radius=4, wave_count=4, wave_size=3, wave_growth=1, wave_interval=5, bee_health=4, bee_damage=1, ant_archetypes=STANDARD_ANT_ARCHETYPES, food=12): """ Construct the GameState for the beginning of a standard game, which has the ant queen in the center of a square of ColonyPlaces, the Bee's hive on the periphery, and Bee's attacking in waves of increasing size. Most of the ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment