Compare commits

...

2 Commits

Author SHA1 Message Date
semantic-release-bot
659464d3b4 chore(release): 4.65.1 [skip ci]
## [4.65.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.65.0...v4.65.1) (2025-10-22)

### Bug Fixes

* **complement-race:** use sendMove with correct parameters for position updates ([06cd94b](06cd94b24c))
2025-10-22 17:43:07 +00:00
Thomas Hallock
06cd94b24c fix(complement-race): use sendMove with correct parameters for position updates
Fixed ReferenceError where makeMove was undefined. The correct function
is sendMove from useArcadeSession, which requires playerId and userId
parameters in addition to the move type and data.

Changes:
- Changed makeMove to sendMove
- Added playerId and userId to the move object
- Added localPlayerId guard to prevent updates before player is identified
- Updated dependency array to include localPlayerId, viewerId, and sendMove

This fixes the runtime error preventing ghost trains from working.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:41:44 -05:00
3 changed files with 21 additions and 5 deletions

View File

@@ -1,3 +1,10 @@
## [4.65.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.65.0...v4.65.1) (2025-10-22)
### Bug Fixes
* **complement-race:** use sendMove with correct parameters for position updates ([06cd94b](https://github.com/antialias/soroban-abacus-flashcards/commit/06cd94b24cdd9dbd36fb5800c9ba7be194f7eed0))
## [4.65.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.64.2...v4.65.0) (2025-10-22)

View File

@@ -566,20 +566,29 @@ export function ComplementRaceProvider({ children }: { children: ReactNode }) {
// Broadcast position to server for multiplayer ghost trains
useEffect(() => {
if (!compatibleState.isGameActive || compatibleState.style !== 'sprint') {
if (!compatibleState.isGameActive || compatibleState.style !== 'sprint' || !localPlayerId) {
return
}
// Send position update every 200ms
const interval = setInterval(() => {
makeMove({
sendMove({
type: 'UPDATE_POSITION',
playerId: localPlayerId,
userId: viewerId || '',
data: { position: clientPosition },
})
} as ComplementRaceMove)
}, 200)
return () => clearInterval(interval)
}, [compatibleState.isGameActive, compatibleState.style, clientPosition, makeMove])
}, [
compatibleState.isGameActive,
compatibleState.style,
clientPosition,
localPlayerId,
viewerId,
sendMove,
])
// Keep lastLogRef for future debugging needs
// (removed debug logging)

View File

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