Skip to content

Conversation

@tpike3
Copy link
Member

@tpike3 tpike3 commented Mar 25, 2023

This fixes the complexity explorer user identified error as well as two other bugs found in running the example (processing batch run and running batch run)

- Include interactive version with single run, batch run and server options
- Update .gitignore to ignore IDE environment files
…orer Tutorial

- update Readme so batch run does not get an arugment error
- update run so data processing of batchrunner doe snot get a key error
sugar_patch = self.get_sugar(self.pos)
# eat sugar

if sugar_patch:
Copy link
Contributor

@rht rht Mar 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be:

if sugar_patch:
    self.sugar  += sugar_patch.amount
    sugar_patch.amount = 0
self.sugar -= metabolism_sugar

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I interpreted the matrix conversation that you didn't have a strong opinion either-- the way I changed it or the way you commented.

With how I changed it is just adding lines, although more verbose, vs rewriting the if statement

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think simplifying to not have else does definitely clarify the code that self.sugar -= metabolism_sugar happens in all branches of execution. The one that I don't have opinion is on the grouping collect sugar, eat sugar, collect spice, eat spice vs collect sugar & spice, eat sugar & spice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh...got it I will update and sync the tutorial as well.

@tpike3
Copy link
Member Author

tpike3 commented Mar 28, 2023

Sorry not sure why my last branch didn't just update this pull request. I am closing this one

@tpike3 tpike3 closed this Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants