|
@@ -29,7 +29,12 @@ export const [
|
|
gameState: PRE_GAME,
|
|
gameState: PRE_GAME,
|
|
}, {
|
|
}, {
|
|
setPlayerName: ([set], playerName) => set({ playerName }),
|
|
setPlayerName: ([set], playerName) => set({ playerName }),
|
|
- goToLobby: ([set], gameId) => set({ gameId, gameState: PRE_ROUND }),
|
|
|
|
|
|
+ goToLobby: ([set], gameId) => set({
|
|
|
|
+ gameId,
|
|
|
|
+ gameJoined: false,
|
|
|
|
+ playerId: null,
|
|
|
|
+ gameState: PRE_ROUND,
|
|
|
|
+ }),
|
|
joinGame: async ([set, get]) => {
|
|
joinGame: async ([set, get]) => {
|
|
const gameId = get.gameId();
|
|
const gameId = get.gameId();
|
|
const name = get.playerName();
|
|
const name = get.playerName();
|
|
@@ -44,7 +49,6 @@ export const [
|
|
roundNum,
|
|
roundNum,
|
|
selectedPoint || { timeout: true }
|
|
selectedPoint || { timeout: true }
|
|
);
|
|
);
|
|
- console.log(score + " " + totalScore);
|
|
|
|
set({
|
|
set({
|
|
lastRound: {
|
|
lastRound: {
|
|
roundNum,
|
|
roundNum,
|