Пример #1
0
 protected virtual void ProcessPlayerMoveMessage(Jid jid, PlayerMoveMessage playerMoveMessage)
 {
 }
        protected override void ProcessPlayerMoveMessage(Jid player, PlayerMoveMessage playerMoveMessage)
        {
            TournamentManager.ProcessPlayerMove(playerMoveMessage.GameId, player.ToString(), MoveFactory.GetMove(playerMoveMessage.Move));

            base.ProcessPlayerMoveMessage(player, playerMoveMessage);
        }
Пример #3
0
        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);
        }