Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In this PR, I implement Gamemodes and Customers into Robotouille.
Previously, stepping in the environment was controlled using the
step()
function within theState
class. However, this was problematic because it was controlling more than just updates to the state, especially with new modules like Movement. Now, there is a new module calledGameMode
that controls all modules within Robotouille.The
GameMode
class also lets Robotouille have win conditions. In this PR, I implement a basic gamemode called `Classic' where the player must serve a number of customers within a certain amount of time.Changes Made
Customers
Customer
class which keeps track about information about the customers and steps them in the environmentdomain.py
anddomain_builder.py
to now keep track ofnpc_actions
, all actions that the npc can do as defined in the domainmovement.py
to also move customersstate.py
to keep track of customers and customer_actionsrecipes.json
where recipes can be specifiedrobotouille.json
to include Customer type, predicates, and actionsbuilder.py
andobject_enmus.py
to include Customer typecustomer.json
andmulti_customer.json
to test customersrenderer.py
,canvas.py
,robotouille_env.py
androbotouille_config.json
to render customersGameMode
GameMode
class that serves as the overall control of the game, keeps track of win conditions, and steps all the modules in the gameClassic
subclass where a player must satisfy all recipes before a given timestate.py
toclassic.py
env_utils.py
to prevent circular imports when creating the GameMode and Customersrobotouille_simulator.py
to passpygame.time
into the gamemode classChanges to Containers
robotouille.json
so that containers can now be picked up and placed with items on itinput.json
canvas.py
to properly render containers and items stacked on containersTest Coverage
Tested with all environments
Next Steps
Screenshots