Permalink
Browse files

Actually block the move when not the player's turn.

  • Loading branch information...
cjsaylor committed Aug 14, 2018
1 parent 28fd115 commit 283d132c7549dc75bd0c2be8ea8b060f3e9edcfd
Showing with 2 additions and 1 deletion.
  1. +2 −1 integration/events.go
@@ -120,7 +120,8 @@ func (s SlackHandler) handleMoveCommand(gameID string, move string, ev *slackeve
}
player := gm.TurnPlayer()
if ev.User != player.ID {
log.Println("ignoreing player input as it is not their turn")
s.sendError(gameID, ev.Channel, "Please wait for your turn.")
return
}
chessMove, err := gm.Move(move)
if err != nil {

0 comments on commit 283d132

Please sign in to comment.