Send played move to both players.
This commit is contained in:
parent
bfc9d247be
commit
f303a572cc
@ -86,7 +86,12 @@ func (game *chessGame) handle() {
|
||||
gameState = WhiteToMove
|
||||
}
|
||||
|
||||
err := WriteMessageToPlayer(&game.currentTurnPlayer, receivedMessage, messageType)
|
||||
err := WriteMessageToPlayer(&game.players[0], receivedMessage, messageType)
|
||||
if err != nil {
|
||||
log.Println("Error during message writing:", err)
|
||||
break
|
||||
}
|
||||
err = WriteMessageToPlayer(&game.players[1], receivedMessage, messageType)
|
||||
if err != nil {
|
||||
log.Println("Error during message writing:", err)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user