team9: adding fuel feature for challanging racing - #14
Open
hilaC24 wants to merge 2 commits into
Open
Conversation
Member
|
Thank you for the pull request 💮 Can you add a pull request description ? |
The fuel feature added score, track and net handling that referenced obstacles.FUEL, but the constant was never defined, so the whole test suite failed to collect. Define FUEL in rose.common.obstacles. It is intentionally kept out of ALL: that tuple feeds get_random_obstacle(), and track.py already spawns fuel cans on a separate path with its own spawn chance and minimum-gap rule, so including it there would bypass that logic. Add the new fuel and refuels keys to the expected dict in test_player_state, which asserts on the full Player.state() output. Also wrap the send_post_request payload to satisfy black. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a fuel resource to the game engine: each player starts with a fuel
tank and a max cap, burns a fixed amount per move, and refuels only via
an explicit PICKUP on a fuel can — same rule as the existing penguin
collectible. Cans spawn on the track at a tunable rate with a minimum
row gap so they can't cluster. A car that runs out of fuel stops
completely for the rest of the round — excluded from driver requests
and scoring — while any car with fuel keeps racing normally. The round
ends and the winner is decided by score, either when the clock runs out
or immediately if every car has stalled first, replacing the previous
rule that simply halved points on an empty tank. Covered by 62 passing
tests.