Feat: end turn endpoint
This commit is contained in:
@ -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
|
||||
|
@ -84,6 +84,7 @@ func MakeTestState() *FullInfo {
|
||||
Cards: cards,
|
||||
RedTeam: redTeam,
|
||||
BlueTeam: blueTeam,
|
||||
TeamTurn: "blue",
|
||||
}
|
||||
us := &UserState{
|
||||
Username: "test-name",
|
||||
|
Reference in New Issue
Block a user