Spaces:
Sleeping
Sleeping
day number
Browse files- src/components/Game.tsx +6 -4
src/components/Game.tsx
CHANGED
|
@@ -25,20 +25,22 @@ export const SHOW_DEBUG_UI = !!import.meta.env.VITE_SHOW_DEBUG_UI;
|
|
| 25 |
|
| 26 |
export function GameStateLabel(game: GameObj, me: PlayerDescription | undefined) {
|
| 27 |
let humans = [...game.world.players.values()].filter(player => player.human).length
|
|
|
|
| 28 |
switch (game.world.gameCycle.cycleState) {
|
| 29 |
case 'Day':
|
|
|
|
| 30 |
return {
|
| 31 |
-
label:
|
| 32 |
desc: 'Find out who is a werewolf',
|
| 33 |
};
|
| 34 |
case 'WerewolfVoting':
|
| 35 |
return {
|
| 36 |
-
label:
|
| 37 |
desc: 'Select a player who is a warewolf',
|
| 38 |
};
|
| 39 |
case 'PlayerKillVoting':
|
| 40 |
return {
|
| 41 |
-
label:
|
| 42 |
desc: me?.type === 'werewolf' ? 'Select a player to kill' : 'Hide in your home!!',
|
| 43 |
};
|
| 44 |
case 'LobbyState':
|
|
@@ -48,7 +50,7 @@ export function GameStateLabel(game: GameObj, me: PlayerDescription | undefined)
|
|
| 48 |
};
|
| 49 |
case 'Night':
|
| 50 |
return {
|
| 51 |
-
label:
|
| 52 |
desc: me?.type === 'werewolf' ? 'Discuss who to kill with other warewolves' : 'Hide in your home!!',
|
| 53 |
};
|
| 54 |
case 'EndGame':
|
|
|
|
| 25 |
|
| 26 |
export function GameStateLabel(game: GameObj, me: PlayerDescription | undefined) {
|
| 27 |
let humans = [...game.world.players.values()].filter(player => player.human).length
|
| 28 |
+
let cycle_num=0
|
| 29 |
switch (game.world.gameCycle.cycleState) {
|
| 30 |
case 'Day':
|
| 31 |
+
cycle_num+=1;
|
| 32 |
return {
|
| 33 |
+
label: `Day ${cycle_num}`,
|
| 34 |
desc: 'Find out who is a werewolf',
|
| 35 |
};
|
| 36 |
case 'WerewolfVoting':
|
| 37 |
return {
|
| 38 |
+
label: `Werewolf Vote ${cycle_num}`,
|
| 39 |
desc: 'Select a player who is a warewolf',
|
| 40 |
};
|
| 41 |
case 'PlayerKillVoting':
|
| 42 |
return {
|
| 43 |
+
label: `Player Kill Vote ${cycle_num}`,
|
| 44 |
desc: me?.type === 'werewolf' ? 'Select a player to kill' : 'Hide in your home!!',
|
| 45 |
};
|
| 46 |
case 'LobbyState':
|
|
|
|
| 50 |
};
|
| 51 |
case 'Night':
|
| 52 |
return {
|
| 53 |
+
label: `Night ${cycle_num}`,
|
| 54 |
desc: me?.type === 'werewolf' ? 'Discuss who to kill with other warewolves' : 'Hide in your home!!',
|
| 55 |
};
|
| 56 |
case 'EndGame':
|