{#if error}
Error connecting to game: {error} {#if staleSession}
Back to Home
{/if}
{/if} {#if state}
{#if state.game.phase === 'scene'} {:else}
{#if ['scene_setup', 'recruit_creation'].includes(state.game.phase) && (state.game.last_rank_up_player_id || state.game.current_scene_number > 1)}
{#if state.game.last_rank_up_player_id} ๐Ÿ† {displayName(state.players.find(p => p.id === state.game.last_rank_up_player_id))} won the rank-up vote! {:else} Voting complete. No one ranked up this time. {/if}
{/if} {#if state.game.phase === 'lobby'} {:else if state.game.phase === 'character_creation' || state.game.phase === 'swap_techniques' || state.game.phase === 'assign_techniques'} {:else if state.game.phase === 'scene_setup'} {:else if state.game.phase === 'between_scenes' || state.game.phase === 'deep_upkeep'} {:else if state.game.phase === 'recruit_creation'} {:else if state.game.phase === 'ended'} {:else}
Unknown phase: {state.game.phase}
{/if}
{/if}
{:else if !error}

Loading game state...

{/if}