Repository navigation
Conversation
… breaker badge, stats event Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnC1czCvYuRNwbg3qV7svZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnC1czCvYuRNwbg3qV7svZ
…t-program search) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnC1czCvYuRNwbg3qV7svZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnC1czCvYuRNwbg3qV7svZ
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.
Requested by Kevin · project thread
Kevin cleared Floor 48 "Antenna Array" in 9 commands against a par of 13, and the results card just said "Perfect run!". This PR adds a reward for clears under par and tightens the pars that turned out to be loose.
Under par reward (free)
A clear beats par when it is within both pars and under at least one of them (
beatsParinprogress.ts). On tower floors, the daily and Overflow (not player-made floors):--under), a 💎 "N commands under par" badge, the commands chip outlined in blue, and a PATCH line: "9 commands? My best was 13. Nice find!" Colourful mode keeps the blue border. Reduce motion shows the same card with no animation.progress.underPar[floorId]= fewest commands of an under-par clear. Sanitized, so it rides in backup codes.under_parevent (floor, commands, steps), sent once per new best, so loose pars show up in the Sheet. Code.gs needs the new type (under_par: 1inTYPES): paste and redeploy, which is already on the to-do list from PR Harden save loading, backup import and stats endpoint #40.Par fixes
LV-4 searches floors with if/while without sensors, and searches function floors only with small loop and function bodies. So shorter programs could get through. New
npm run par:scansearches with if/while and F1 included (keeping only the smallest of programs that act the same, with a time budget per floor). A hit must stay within the step par, so 3 stars stays reachable.F1 def F1 { while not wall_ahead { forward if tile_is g { turn_right } if wall_ahead { activate turn_right turn_right } } }repeat 2 { F1 repeat 2 { F1 turn_right } } def F1 { forward forward activate }repeat 2 { F1 } def F1 { turn_left pick_up turn_right drop repeat 3 { jump } }Hints 2 and 3 on those floors now follow the new solutions (English and French).
Left as is on purpose: T3 F38 "Bug Hunt: Wrong Question" (par 6). A 5-command program exists (
wait while not wall_ahead { forward while wall_ahead { turn_right } }), but it skips the bug fix the floor is about, so finding it earns "Under par" instead.Scan coverage: 69 floors settled (no shorter program) and 3 changed. 18 floors were too big to settle even with 3 minutes each: T1 F23, 37-40, 44, 46, 49; T2 F29, 35, 40, 49, 50; T3 F37, 39, 45, 48, 50. Floor 48 was one of those before Kevin found the 9. Floors with F2, twins, partners, recursion or the tally aren't scanned (the existing LV checks cover them). The new reward plus the
under_parstats event is the safety net for any par we missed.Screenshots (Floor 22, 8 commands vs par 9)
Tests
tsc -bis clean and the fullvitest runpasses: 2796 tests, including LV-1 to LV-4 on the changed floors. New unit tests coverbeatsPar,recordUnderParand the backup round trip.Kevin asked not to build a new APK for small tweaks, so this ships with the next build.
Generated by Claude Code