use game start dto that i already defined

This commit is contained in:
Branden J Brown 2024-01-29 21:23:55 -06:00
parent e8a181a4f7
commit 23703dbe3e
1 changed files with 3 additions and 4 deletions

View File

@ -94,10 +94,9 @@ func (s *Server) joinAndServe(p person) {
go gameActor(ctx, g, p, other, nil)
}
// Reply with the game ID so they can share.
r := struct {
Game lobby.GameID `json:"game"`
}{
Game: id,
r := serve.GameStart{
ID: id,
Dealer: deal,
}
if err := wsjson.Write(context.TODO(), p.conn, r); err != nil {
slog.WarnContext(ctx, "got a game but player dropped", "game", id, "player", p.id)