pong:front: pretty end screen + self & opponent names prints

This commit is contained in:
bgoulard 2026-01-05 15:56:47 +01:00 committed by Maix0
parent 03be784a51
commit 61b49ab370
6 changed files with 61 additions and 18 deletions

View file

@ -32,6 +32,8 @@ export type GameMove = {
export interface ClientToServer {
enqueue: () => void;
dequeue: () => void;
readyUp: () => void;
readyDown:() => void;
debugInfo: () => void;
gameMove: (up: GameMove) => void;
connectedToGame: (gameId: string) => void;

View file

@ -69,6 +69,10 @@ class StateI {
u1.currentGame = gameId;
u2.currentGame = gameId;
// ---
// wait for ready up
// ---
g.gameUpdate = setInterval(() => {
g.tick();
this.gameUpdate(gameId, u1.socket);