{gameState.hasNotStarted() ? 'Place your ships' : gameState.turn >= 0 ? 'Make a guess' : 'Waiting for opponent'}

{#if gameState.room}
{gameState.users}
{/if}

Your Board

{}} />

Opponent's Board

= 0 ? 'scale-[1.01]' : 'opacity-60'} board={gameState.opponentBoard} callback={(i, j) => gameState.attack(i, j)} /> {#if gameState.phase === 'gameover'}

Game Over

{gameState.turn >= 0 ? 'You win!' : 'You lose!'}

{/if} {#if gameState.hasNotStarted()} gameState.createRoom()} joinRoom={(code) => gameState.joinRoom(code)} {leaveRoom} /> {/if}