Skip to content

Commit

Permalink
Server sends the client a message on game reset (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigafoos committed Mar 17, 2019
1 parent 0cb4914 commit 39fdd84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
Private = "privatemessage"
Dead = "dead"
Error = "error"
Reset = "reset"
)

type Message struct {
Expand Down
1 change: 1 addition & 0 deletions player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 39fdd84

Please sign in to comment.