Skip to content

Add cow racing#94

Draft
cjrace wants to merge 17 commits intomainfrom
cow-racing
Draft

Add cow racing#94
cjrace wants to merge 17 commits intomainfrom
cow-racing

Conversation

@cjrace
Copy link
Copy Markdown
Owner

@cjrace cjrace commented Mar 19, 2025

Overview of changes

Added a cow racing game.

It's still pretty basic and needs prettying and polishing but gives a starting point.

Attempted a bunch of dependency updates, that caused a world of pain and got nowhere so reverted it for now.

Checklist

  • I have tested these changes locally using pnpm test
  • I have updated the documentation (if needed)
  • I have added or updated tests for these changes (if applicable)

Reviewer instructions

Still having issues with the finish line calculation - it's not currently using the right measurements so messes up on different screen resolutions any help with this would be appreciated, tried a few things and it just keeps being too long (i.e. the cows run off the screen)

@cjrace cjrace requested a review from lauraselby March 19, 2025 23:22
@cjrace cjrace changed the title initial frame for cow racing Add cow racing Mar 19, 2025
@cjrace cjrace added new feature New feature or request dependencies Pull requests that update a dependency file labels Mar 29, 2025
bump package versions

bump pnpm version

bump pnpm again

helping bcrypt build in GHA

undo python step in gha

approve bcrypt and sharp builds specifically

experimenting further with build script

try adding a pnpmfile

update lockfile

testing testing testing
@cjrace cjrace removed the dependencies Pull requests that update a dependency file label Mar 29, 2025
@cjrace cjrace marked this pull request as ready for review March 29, 2025 18:13
@cjrace cjrace marked this pull request as draft March 30, 2025 14:37
cjrace and others added 10 commits April 4, 2026 17:25
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…x only

CSS left and framer-motion x were both applied, moving cows at 2x
the intended distance. Now left is fixed at 0 and framer-motion
owns all horizontal movement via translateX.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sition

raceTrackRect.right gives the distance from the left viewport edge to
the element's right edge, which varies with scroll and screen size.
Using raceTrackRect.width * 0.95 aligns the finish trigger with the
visual finish line marker (right: 5%), minus the cow image width so
the cow's leading edge crosses the line.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous lockfile was corrupted by an aborted dependency update attempt,
with wrong minimatch dependencies, a dotenv version mismatch, and eslint
appearing as a direct dependency not present in package.json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- cowrace: convert number expressions to String() in template literals
  to satisfy restrict-template-expressions
- cowrace: move setCowPositions/setWinners reset into startRace handler
  to satisfy react-hooks/set-state-in-effect (no synchronous setState
  in effect body)
- irishbingo, snakesandladders: remove inferrable useState type arguments
  to satisfy no-unnecessary-type-arguments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant