Compare commits

..

5 Commits

Author SHA1 Message Date
semantic-release-bot
72bb2eb58b chore(release): 4.7.0 [skip ci]
## [4.7.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.10...v4.7.0) (2025-10-18)

### Features

* **complement-race:** enable adaptive AI difficulty in arcade ([55010d2](55010d2bcd))
2025-10-18 14:26:08 +00:00
Thomas Hallock
55010d2bcd feat(complement-race): enable adaptive AI difficulty in arcade
Implemented adaptive AI speed adjustment based on player performance:
- Added UPDATE_AI_SPEEDS handler to update clientAIRacers speeds
- Added UPDATE_DIFFICULTY_TRACKER handler to update local state
- Now matches solo game behavior where AI speeds adapt to challenge

AI speeds adjust based on:
- Player success rate (0.5x to 1.6x multiplier)
- Average response time (faster players get faster AI)
- Current streak (hot streaks increase challenge)
- Learning mode (no adaptation until sufficient data)

This provides dynamic difficulty balancing, making the game
engaging for both beginners and advanced players.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 09:25:02 -05:00
semantic-release-bot
f735e5d3ba chore(release): 4.6.10 [skip ci]
## [4.6.10](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.9...v4.6.10) (2025-10-18)

### Bug Fixes

* **complement-race:** improve AI speech bubble positioning ([6e436db](6e436db5e7))
* **docker:** remove reference to deleted @soroban/client package ([2953ef8](2953ef8917))
2025-10-18 14:21:51 +00:00
Thomas Hallock
6e436db5e7 fix(complement-race): improve AI speech bubble positioning
Speech bubbles now:
- Position 15px above AI racers instead of directly over them
- Use zIndex 20 to appear above all racers (player: 10, AI: 5)

This fixes two UX issues:
1. Bubbles were covering AI racer emojis, making them invisible
2. Bubbles appeared under player avatar when racers were close

Applied to both LinearTrack (practice) and CircularTrack (survival)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 09:20:40 -05:00
Thomas Hallock
2953ef8917 fix(docker): remove reference to deleted @soroban/client package
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 09:20:40 -05:00
6 changed files with 50 additions and 6 deletions

View File

@@ -1,3 +1,18 @@
## [4.7.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.10...v4.7.0) (2025-10-18)
### Features
* **complement-race:** enable adaptive AI difficulty in arcade ([55010d2](https://github.com/antialias/soroban-abacus-flashcards/commit/55010d2bcd953718d8fea428b1f7f613a193779c))
## [4.6.10](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.9...v4.6.10) (2025-10-18)
### Bug Fixes
* **complement-race:** improve AI speech bubble positioning ([6e436db](https://github.com/antialias/soroban-abacus-flashcards/commit/6e436db5e709d944ebffed6936ea1f8e4bd2e19e))
* **docker:** remove reference to deleted @soroban/client package ([2953ef8](https://github.com/antialias/soroban-abacus-flashcards/commit/2953ef8917f7b13f6eb562eb7d58d14179a718da))
## [4.6.9](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.6.8...v4.6.9) (2025-10-18)

View File

@@ -13,7 +13,6 @@ WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./
COPY apps/web/package.json ./apps/web/
COPY packages/core/client/node/package.json ./packages/core/client/node/
COPY packages/core/client/typescript/package.json ./packages/core/client/typescript/
COPY packages/abacus-react/package.json ./packages/abacus-react/
COPY packages/templates/package.json ./packages/templates/

View File

@@ -401,7 +401,11 @@ export function CircularTrack({ playerProgress, playerLap, aiRacers, aiLaps }: C
{activeBubble && (
<div
style={{
transform: `rotate(${-aiPos.angle}deg)`, // Counter-rotate bubble
position: 'absolute',
bottom: '100%', // Position above the AI racer
left: '50%',
transform: `translate(-50%, -15px) rotate(${-aiPos.angle}deg)`, // Offset 15px above, counter-rotate bubble
zIndex: 20, // Above player (10) and AI racers (5)
}}
>
<SpeechBubble

View File

@@ -144,7 +144,11 @@ export function LinearTrack({
{activeBubble && (
<div
style={{
transform: 'scaleX(-1)', // Counter-flip bubble to make text readable
position: 'absolute',
bottom: '100%', // Position above the AI racer
left: '50%',
transform: 'translate(-50%, -15px) scaleX(-1)', // Offset 15px above, counter-flip bubble
zIndex: 20, // Above player (10) and AI racers (5)
}}
>
<SpeechBubble

View File

@@ -842,12 +842,34 @@ export function ComplementRaceProvider({ children }: { children: ReactNode }) {
}
break
}
case 'UPDATE_AI_SPEEDS': {
// Update client-side AI speeds (adaptive difficulty)
if (action.racers && Array.isArray(action.racers)) {
setClientAIRacers((prevRacers) =>
prevRacers.map((racer) => {
const update = action.racers.find(
(r: { id: string; speed: number }) => r.id === racer.id
)
return update
? {
...racer,
speed: update.speed,
}
: racer
})
)
}
break
}
case 'UPDATE_DIFFICULTY_TRACKER': {
// Update local difficulty tracker state
setLocalUIState((prev) => ({ ...prev, difficultyTracker: action.tracker }))
break
}
// Other local actions that don't affect UI (can be ignored for now)
case 'UPDATE_MOMENTUM':
case 'UPDATE_TRAIN_POSITION':
case 'UPDATE_STEAM_JOURNEY':
case 'UPDATE_DIFFICULTY_TRACKER':
case 'UPDATE_AI_SPEEDS':
case 'GENERATE_PASSENGERS': // Passengers generated server-side when route starts
case 'COMPLETE_ROUTE':
case 'HIDE_ROUTE_CELEBRATION':

View File

@@ -1,6 +1,6 @@
{
"name": "soroban-monorepo",
"version": "4.6.9",
"version": "4.7.0",
"private": true,
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
"workspaces": [