-
Notifications
You must be signed in to change notification settings - Fork 72
Level 1 Minimum Product: Pickups #244
Level 1 Minimum Product: Pickups #244
Conversation
|
||
def test_serialise(self): | ||
self.assertEqual(self.pickup.serialise(), {'type': 'damage', 'damage_boost': 5}) | ||
self.assertEqual(self.pickup.serialise(), {'type' : 'delivery'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space
When approved, I'll clean up the history and squash these commits. Otherwise github doesn't see changes. |
@@ -20,6 +20,7 @@ def __init__(self, player_id, initial_location, worker_url, avatar_appearance): | |||
self.health = 5 | |||
self.score = 0 | |||
self.events = [] | |||
self.holdingTote = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how that system will work, wouldn't it be better to have a collection of gathered pickups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought our idea was to have a single pickup and deliver it somewhere - but then that doesn't make the code very scalable if we want to change it, that's true.
Do we want to have multiple delivery items held at some particular one time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess just having a set of how many items of which type we have at one moment would work, here that would just be a set of one tote. That would be more scalable, even if this would be easy to refactor. What do you think @OlafSzmidt @mrniket ?
aimmo-game/simulation/pickup.py
Outdated
super(DeliveryTote, self).__init__(cell) | ||
|
||
def _apply(self, avatar): | ||
avatar.holdingTote = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. I forgot to remove one of the files.
Comments @mrniket before the commits are squashed? |
No I'm happy :) |
test_pickup_decoder written for the new class. Changes made as requested in PR. holdingTote no longer used. Implemented Counter Obsolete pickup file removed.
a44d7c5
51c09dd
to
a44d7c5
Compare
Rebased. |
@mrniket @CelineBoudier One last approval so we can merge this :) |
It's the fiiinal approooooval, tadadadaaaa |
I decided to make multiple pull requests as the whole change of the codebase will be quite lengthy.
Changes Made:
HealthPickup
,InvulnerabilityPickup
andDamagePickup
removed._PickupEffect
frompickups.py
is gone.JSONDecoder
changed to only decode the one type of pickup now.custom_map.py
,test_pickups.py
,test_simulation.py
,test_pickup_decoder()
,test_custom_map
andALL_PICKUPS