protected virtual void ProcessTurnStartMessage(Jid from, TurnStartMessage turnStartMessage) { }
private void TurnStartedHandler(object sender, TurnStartEventArgs e) { var turnStartXml = new TurnStartMessage { GameId = e.GameInfo.GameId }.ToXml(); Connection.Send(new Message(e.GameInfo.Player1, turnStartXml)); Connection.Send(new Message(e.GameInfo.Player2, turnStartXml)); }
protected override void ProcessTurnStartMessage(Jid from, TurnStartMessage turnStartMessage) { var move = _bots[turnStartMessage.GameId].MakeMove(); var messageXml = new PlayerMoveMessage { GameId = turnStartMessage.GameId, Move = move.Name }.ToXml(); Connection.Send(new Message(from, messageXml)); base.ProcessTurnStartMessage(from, turnStartMessage); }