private void RpcSetGameSituation(SerializedGameSituation serializedGameSituation) { if (!isLocalPlayer) { return; } GameSituation gameSituation = SerializedGameSituation.Deserealize(serializedGameSituation); clientManager.SetGameSituation(gameSituation); if (gameSituation.GameStatus == GameStatus.OpponentExits) { clientManager.Block(true, PlayerColor.White); clientManager.Block(true, PlayerColor.Black); return; } if ((playerColor == PlayerColor.White) && (gameSituation.IsWhiteMoving)) { clientManager.Block(false, PlayerColor.White); } else if ((playerColor == PlayerColor.Black) && (!gameSituation.IsWhiteMoving)) { clientManager.Block(false, PlayerColor.Black); } else { clientManager.Block(true, playerColor); } }
public void SetGameSituation(GameSituation gameSituation) { clientManager.SetGameSituation(gameSituation); if ((playerColor == PlayerColor.White) && (gameSituation.IsWhiteMoving)) { clientManager.Block(false, PlayerColor.White); } else if ((playerColor == PlayerColor.Black) && (!gameSituation.IsWhiteMoving)) { clientManager.Block(false, PlayerColor.Black); } else { clientManager.Block(true, PlayerColor.White); clientManager.Block(true, PlayerColor.Black); } }
public void SetGameSituation(GameSituation gameSituation) { clientManager.SetGameSituation(gameSituation); clientManager.Block(!gameSituation.IsWhiteMoving, PlayerColor.White); clientManager.Block(gameSituation.IsWhiteMoving, PlayerColor.Black); }