Esempio n. 1
0
 public KaroCommunicatedGameManager(ICommunication communication)
     : base()
 {
     name = "Computer player";
     CurrentPlayer = Players.Min;
     _conversion = new CommunicationProtocolConversionUtility(Game);
     _communication = communication;
     _communication.Connected += Communication_Connected;
     _communication.Disconnected += Communication_Disconnected;
     _communication.RequestFirstMove += Communication_RequestFirstMove;
     _communication.SentMoveInvalid += Communication_SentMoveInvalid;
     _communication.TurnReceived += Communication_TurnReceived;
     _communication.WinAccepted += Communication_WinAccepted;
     _communication.WinDetected += Communication_WinDetected;
     _communication.WinRejected += Communication_WinRejected;
 }
Esempio n. 2
0
 /// <summary>
 /// Start tracking a new game.
 /// </summary>
 /// <param name="karoGame">The new game this panel should show.</param>
 public void NewGame(KaroGameManager manager)
 {
     _manager = manager;
     _manager.OnBoardUpdated += BoardChanged;
     _conversion = new CommunicationProtocolConversionUtility(_manager.Game);
     Invalidate();
 }