????
This commit is contained in:
parent
d2e9d6cf01
commit
1eeb33e851
2
game.go
2
game.go
@ -144,10 +144,12 @@ func playerActor(ctx context.Context, p person, actions chan<- action) {
|
|||||||
func broadcast(ctx context.Context, g *game.Match, dealer, chall person, obs []observer) {
|
func broadcast(ctx context.Context, g *game.Match, dealer, chall person, obs []observer) {
|
||||||
// TODO(zeph): this probably should return an error or some other signal
|
// TODO(zeph): this probably should return an error or some other signal
|
||||||
// if a player drops so that the actor knows to quit
|
// if a player drops so that the actor knows to quit
|
||||||
|
slog.InfoContext(ctx, "send to dealer")
|
||||||
if err := wsjson.Write(ctx, dealer.conn, g.DTO(dealer.id)); err != nil {
|
if err := wsjson.Write(ctx, dealer.conn, g.DTO(dealer.id)); err != nil {
|
||||||
// TODO(zeph): concede, but we need to be careful not to recurse
|
// TODO(zeph): concede, but we need to be careful not to recurse
|
||||||
slog.InfoContext(ctx, "lost dealer", "player", dealer.id, "err", err.Error())
|
slog.InfoContext(ctx, "lost dealer", "player", dealer.id, "err", err.Error())
|
||||||
}
|
}
|
||||||
|
slog.InfoContext(ctx, "send to challenger")
|
||||||
if err := wsjson.Write(ctx, chall.conn, g.DTO(chall.id)); err != nil {
|
if err := wsjson.Write(ctx, chall.conn, g.DTO(chall.id)); err != nil {
|
||||||
// TODO(zeph): concede, but we need to be careful not to recurse
|
// TODO(zeph): concede, but we need to be careful not to recurse
|
||||||
slog.InfoContext(ctx, "lost challenger", "player", chall.id, "err", err.Error())
|
slog.InfoContext(ctx, "lost challenger", "player", chall.id, "err", err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user