pong:front: pretty end screen + self & opponent names prints
This commit is contained in:
parent
03be784a51
commit
61b49ab370
6 changed files with 61 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue