From 39fdd84bdba71f8258febf3a590d80eab8dc439e Mon Sep 17 00:00:00 2001 From: Dan Conley Date: Sat, 16 Mar 2019 20:33:32 -0400 Subject: [PATCH] Server sends the client a message on game reset (#14) --- message/message.go | 1 + player/player.go | 1 + 2 files changed, 2 insertions(+) diff --git a/message/message.go b/message/message.go index 2395666..a1a095e 100644 --- a/message/message.go +++ b/message/message.go @@ -20,6 +20,7 @@ const ( Private = "privatemessage" Dead = "dead" Error = "error" + Reset = "reset" ) type Message struct { diff --git a/player/player.go b/player/player.go index c8f9028..712aaea 100644 --- a/player/player.go +++ b/player/player.go @@ -174,6 +174,7 @@ func (p *GamePlayer) SetRole(r *role.Role) { } func (p *GamePlayer) InGame() bool { + p.Message(message.Reset, true) return p.gameChan != nil }