feat: implement variable token offers and auto-round advancement

- Add variable offer system where P1 can offer any amount of tokens
- Players start with 10 tokens each (P1: pavos, P2: elotes)
- Implement offer/request mechanism with token validation
- Auto-advance rounds after P2 actions or P1 no-offer
- G2: Force offer by default, disable no-offer button when forced
- G3: Wait for shame decision after snatch before advancing
- G4: Implement inverse sanction (P1 gets requested without giving offered)
- Reset rounds to 1 when changing game variants
- Fix OfferControls responsiveness issues
- Hide offer controls after active offer
- Update all G1-G5 components with proper offer flow
This commit is contained in:
2025-08-07 23:53:18 -06:00
parent 426d4b7ab6
commit f89331a3db
19 changed files with 898 additions and 157 deletions

View File

@@ -23,7 +23,7 @@
<div class="main-actions">
<button @click="handleQuickPlay" class="btn btn-primary btn-large" :disabled="isJoining">
<span v-if="!isJoining"> Quick Play</span>
<span v-if="!isJoining">🧪 Demo Play</span>
<span v-else>Finding match...</span>
</button>
</div>
@@ -156,8 +156,8 @@ async function handleQuickPlay() {
colyseusService.lobbyRoom.value = null;
}
console.log('Navigating to /game...');
await router.push('/game');
console.log('Navigating to /demo...');
await router.push('/demo');
console.log('Navigation complete');
} catch (error) {
console.error('Failed to join game:', error);
@@ -421,4 +421,4 @@ async function joinRoom(roomId: string) {
color: #666;
font-size: 14px;
}
</style>
</style>