move game id to live among the dtos
This commit is contained in:
parent
24af4b7602
commit
98a45e2680
@ -3,12 +3,11 @@ package lobby
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"git.sunturtle.xyz/studio/shotgun/game"
|
||||
"git.sunturtle.xyz/studio/shotgun/serve"
|
||||
)
|
||||
|
||||
type GameID = uuid.UUID
|
||||
type GameID = serve.GameID
|
||||
|
||||
// Lobby is a set of active games.
|
||||
type Lobby struct {
|
||||
|
11
serve/dto.go
11
serve/dto.go
@ -1,5 +1,7 @@
|
||||
package serve
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
// Game is the JSON DTO for a game.
|
||||
type Game struct {
|
||||
// Players is the players in the game.
|
||||
@ -27,6 +29,15 @@ type Player struct {
|
||||
Cuffs bool `json:"cuffs,omitempty"`
|
||||
}
|
||||
|
||||
type GameID = uuid.UUID
|
||||
|
||||
// GameStart is the JSON DTO given to each player when their game starts.
|
||||
// Observers do not receive it.
|
||||
type GameStart struct {
|
||||
ID GameID `json:"id"`
|
||||
Dealer bool `json:"dealer"`
|
||||
}
|
||||
|
||||
// ShellCounts is the JSON DTO for shell counts emitted at the start of a round.
|
||||
type ShellCounts struct {
|
||||
Live int `json:"live"`
|
||||
|
Loading…
Reference in New Issue
Block a user