-
Notifications
You must be signed in to change notification settings - Fork 928
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
Refactored docs for Introductory Tutorial #2511
Conversation
Thanks for your PR!
Great catch! I remember fixing this bug somewhere sometime, interesting how it keeps appearing. @quaquel can we add a method/keyword to exclude yourself from the “get cell contents” and other similar functions? I don’t agree with the step being merged into a single |
This is still using old style spaces, not new style spaces, so yes you can do it. However, we want to deprecate these for 3.1, so I don't see the point. In new-style spaces, it is a lot harder to fix this, since |
@EwoutH In the "Adding Space" -> "Moving Mesa" section, there is already a function named While in "Collecting Data" Section the Ref: https://mesa.readthedocs.io/stable/tutorials/intro_tutorial.html |
@tpike3 you last looked into the tutorial, do you know what the intended behavior was? |
I think the old |
@Spartan-71 and @EwoutH Sorry for the delay, if I remember correctly I believe the intent was to show users that there is multiple ways to code it. So I think we have two options 1 - Explicitly call out why they are different in the write up and comments I dont think we need to belabor this, just need to pick one Thank you @Spartan-71 for doing this! |
@tpike3 I chose to go ahead with the 2nd option. |
Thanks @Spartan-71! |
Thanks for your effort, and congratulations on getting the PR in! Is this worth backporting to the 3.0.x maintenance branch? |
@tpike3 minor thing, but could you squash such PRs when merging them? |
Summary
Fixed minor logical error in
give_money
function ofMoneyAgent
class.Fixed code inconsistency.
Bug / Issue
Earlier
MoneyAgent
was able to transfer the money to itself.Implementation
Now MoneyAgent
self
has been removed from thecellmates
list and the condition to transfer the money is modified toif len(cellmates) > 0
Testing
Additional Notes