Feat: end turn endpoint

This commit is contained in:
Grail Finder
2025-05-08 20:04:09 +03:00
parent 3cc2ecb93d
commit 8baf03595e
7 changed files with 51 additions and 6 deletions

View File

@ -59,6 +59,17 @@ type Room struct {
RedTurn bool // false is blue turn
}
func (r *Room) ChangeTurn() {
switch r.TeamTurn {
case "blue":
r.TeamTurn = "red"
case "red":
r.TeamTurn = "blue"
default:
r.TeamTurn = "blue"
}
}
type WordCard struct {
Word string
Color WordColor

View File

@ -84,6 +84,7 @@ func MakeTestState() *FullInfo {
Cards: cards,
RedTeam: redTeam,
BlueTeam: blueTeam,
TeamTurn: "blue",
}
us := &UserState{
Username: "test-name",