Skip to content

Commit

Permalink
Merge pull request #30 from awoo-detat/awoo-14
Browse files Browse the repository at this point in the history
Server sends the client a message on game reset (#14)
  • Loading branch information
Sigafoos authored Oct 8, 2020
2 parents 6918c70 + e5e40f1 commit d92090f
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 @@ -21,6 +21,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 d92090f

Please sign in to comment.