-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add backpack with find method #1657
Conversation
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @razvan-pro)
aimmo-game-worker/simulation/avatar_state.py
line 19 at r1 (raw file):
) else: avatar_state_dict["backpack"] = Backpack()
So in the end we're giving creating an Backpack object even if the worksheet doesn't have it?
aimmo-game-worker/simulation/backpack.py
line 15 at r1 (raw file):
def find(self, artefact_type: str) -> int: """ Finds an artefact of type `artefact_type` and returns its index or -1 if there's no artefact of that type.
We should specify that it finds the first index of the artefact type
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.
Reviewable status: 1 of 4 files reviewed, 2 unresolved discussions (waiting on @faucomte97 and @razvan-pro)
aimmo-game-worker/simulation/avatar_state.py
line 19 at r1 (raw file):
Previously, faucomte97 (Florian Aucomte) wrote…
So in the end we're giving creating an Backpack object even if the worksheet doesn't have it?
Ah, true - fixed and added test, thanks 🙂
aimmo-game-worker/simulation/backpack.py
line 15 at r1 (raw file):
Previously, faucomte97 (Florian Aucomte) wrote…
We should specify that it finds the first index of the artefact type
Done.
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.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @razvan-pro)
Codecov Report
@@ Coverage Diff @@
## worksheet4 #1657 +/- ##
=============================================
Coverage ? 67.82%
=============================================
Files ? 165
Lines ? 3360
Branches ? 283
=============================================
Hits ? 2279
Misses ? 1054
Partials ? 27 |
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)