-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add debug logging to score module #479
Conversation
LGTM |
#476 works for me (TM) so I'm ok with merging it first, or after this one :-) |
btw// #472 touches the same files is not ready but it won first place in Nitanim :-) |
I added my reviews @nirs hi, #472 is a PR from the NItanim competition, it has no "owner" now. the kids that made it finished the program and will not continue with there PRs, ( even if they want to continue, they will not know how to respond to the review or how to fix the PR ). This PRs needs someone with permissions to edit PRs, fix it, and merge it (don't wait for the kids to fix it). |
We can turn now debug logs and watch the log to understand how scoring works during the game. This can be useful to debug the code and the tests and improving the docs.
test_player_in_lane_wins() is wrong, not testing any collision. We need to fix it before we do that fix the comments to describe whats going on correctly.
@yaacov logging is much better after to your changes. There are some issue we can fix later because we may change player.x or player.y to invalid value and log the invalid value before the value is clipped to valid value. |
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.
lgtm
Looks like the documentation does not describe the rules of the game correctly. Add debug logs to make it easier to understand the scoring loop and its semantics.
To see the new logs we need to enable debug level logging. In the test this can be done like this:
Example logs from the collisions tests: