Skip to content

team9: adding fuel feature for challanging racing - #14

Open
hilaC24 wants to merge 2 commits into
RedHat-Israel:mainfrom
hilaC24:team9
Open

team9: adding fuel feature for challanging racing#14
hilaC24 wants to merge 2 commits into
RedHat-Israel:mainfrom
hilaC24:team9

Conversation

@hilaC24

@hilaC24 hilaC24 commented Jul 16, 2026

Copy link
Copy Markdown

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.

@hilaC24 hilaC24 changed the title engine change team9: engine change Jul 16, 2026
@yaacov

yaacov commented Jul 16, 2026

Copy link
Copy Markdown
Member

Thank you for the pull request 💮

Can you add a pull request description ?
Can you change the PR title to be more descriptive ?
Does this PR require a UI change ? if it does can you add a link to the UI pull request ?
Can you fix the tests ?

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>
@hilaC24 hilaC24 changed the title team9: engine change team9: adding fuel feature for challanging racing Jul 16, 2026
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