Feat: add game over

This commit is contained in:
Grail Finder
2025-05-11 10:03:18 +03:00
parent becd3aca02
commit cf5643227b
5 changed files with 29 additions and 10 deletions

View File

@ -9,7 +9,11 @@
<button hx-get="/start-game" hx-target="#room" class="bg-amber-100 text-black px-4 py-2 rounded">Start Game</button>
{{end}}
</p>
{{if .Room.IsOver}}
<p>GAME OVER; team <span class="text-{{.Room.TeamWon}}-500">{{.Room.TeamWon}}</span> won! 🧚</p>
{{else}}
<p>Turn of the <span class="text-{{.Room.TeamTurn}}-500">{{.Room.TeamTurn}}</span> team</p>
{{end}}
<p>
{{if eq .State.Team ""}}
join the team!