Commit Graph
15 Commits
Author SHA1 Message Date
FreeTLab 863690168c feat(multidispositivo): reconnection, impostor awareness and protocol fixes
Fixes
- SnapshotPartidaOnline no longer serializes esImpostor unless the game is
  over. Every phase change was broadcasting the impostor roles in clear to
  all clients.
- The impostor clue travels in its own field and only when the game enables
  it. It used to be sent as the category key ("todas" when no category was
  picked) and was overwritten by each phase snapshot.
- Eliminated players can no longer vote nor be voted for, on both the client
  screen and the host listener.
- Nearby listeners are removed on dispose; votes are no longer dispatched
  twice; votacionResultado no longer triggers two navigations.
- _jugadoresHostControlados handed the secret word to the host's own
  impostors in the payload.
- Impostor cap unified as maxImpostoresPara(n) for both modes, and the
  silent clamp in multi-device now reports the effective number.
- palabraAleatoria uses Random.secure.

Impostors know each other
- ConfigPartida.impostoresSeConocen, on by default. companerosImpostores is
  nullable: null means nothing to show, an empty list means "you are the
  only impostor".

Reconnection
- IdentidadDispositivo persists a stable device id; the host uses it as the
  clientId so a phone that drops and returns is the same client. Falls back
  to the endpointId for clients that do not send one.
- Usuario.absorbidoDe records the original owner when the host takes over a
  disconnected player, and they are handed back automatically on return.
- New solicitarResync/resync messages: the host replies with the current
  phase plus that client's own players, and the client jumps straight to the
  running phase.
- Readiness is keyed by clientId instead of endpointId, and a disconnected
  client no longer blocks the round.
- The retry gives up after three minutes, only reconnects to the host it
  belonged to, and is cancelled correctly while shutting down.

Per-word clue support
- The word bank loader accepts both the old list-of-strings format and the
  new one carrying a clue per word, falling back to the category clue.

Not verified on real devices: Nearby reconnection timing still needs two
Android phones.
2026-07-25 20:36:32 +02:00
FreeTLab 158a7ae6a8 Iconografía básica 2026-05-12 01:20:19 +02:00
FreeTLab be255d5ea3 algunos iconos PRO 2026-05-12 00:11:43 +02:00
FreeTLab 4599678e77 refactorización de pantallas 2026-05-11 23:16:38 +02:00
FreeTLab 3c5d98d6dd literales y unificación de resultados en los dos modos de juego 2026-05-11 21:57:46 +02:00
FreeTLab e7c5b08ec0 Limpieza de peso de imágenes 2026-05-11 20:30:59 +02:00
FreeTLab 928cbd8a1d Corrección de errores
Build & Deploy Farolero / Análisis de código (push) Successful in 52s
Build & Deploy Farolero / Build APK + AAB release (push) Successful in 2m17s
2026-05-11 19:14:49 +02:00
FreeTLab 2503b64d34 nuevas pantallas 2026-05-11 18:44:51 +02:00
FreeTLab 112a8a6142 Cambio de icono y traducciones 2026-05-11 18:05:13 +02:00
FreeTLab 42f01949c4 Cambios visuales completos 2026-05-10 17:28:35 +02:00
FreeTLab cfe5d479ff Posible mejora en el multidispositivo 2026-05-05 22:45:51 +02:00
FreeTLab 6e5e423ab4 Implementado:
No se puede marcar “vista” sin revelar la palabra antes.
Se puede volver a ver la palabra durante debate/votación/resultado.
Notas online privadas por partida y jugador.
Tests añadidos para notas scoped.
Ajusté roomId en el payload de inicio para que las notas no se mezclen entre partidas.
2026-05-05 21:49:40 +02:00
FreeTLab 7dd6c7bd74 Mejora flujo de datos en partidas multidispositivos
Build & Deploy Farolero / Análisis de código (push) Successful in 12s
Build & Deploy Farolero / Build APK + AAB release (push) Successful in 1m53s
2026-05-04 20:23:47 +02:00
Javier Bautista Fernández a8d5b0f002 feat: Implement multiplayer game session management
Build & Deploy Farolero / Análisis de código (push) Has been cancelled
Build & Deploy Farolero / Build APK + AAB release (push) Has been cancelled
- Add models for managing player assignments and game session initialization in `inicio_partida_multijugador.dart`.
- Create a multiplayer room state management system in `sala_multijugador.dart`, including user registration, selection, and session validation.
- Develop a UI screen for displaying player words sequentially in `pantalla_palabras_cliente.dart`.
- Implement unit tests for the multiplayer session management and player assignment logic in `inicio_partida_multijugador_test.dart` and `sala_multijugador_test.dart`.
2026-04-27 14:02:33 +02:00
ShanaiaBot eb2662f561 fix: multidispositivo - Random seguro + gestor host + reacción clientes
Build & Deploy Farolero / Análisis de código (push) Has been cancelled
Build & Deploy Farolero / Build APK + AAB release (push) Has been cancelled
- Random.secure() para selección de impostores (no predecible)
- Random.secure() también en desempate de votación
- Nueva PantallaGestorHost para coordinación multi-device
- Navegación: host va a gestor tras iniciar, no a pantalla de palabra
- PantallaPalabraCliente: cada jugador ve su palabra en su móvil
- PantallaDebateCliente: debate con timer y botón solicitar votación
- PantallaVotacionCliente: voto desde el móvil del cliente
- PantallaUnirse: listener que reacciona a partidaInicio y cambia de fase
- Protocolo: listo/voto/solicitoVotacion via Nearby hacia el host
- Nuevas cadenas l10n ES
2026-04-15 02:09:05 +02:00