Exemplo n.º 1
0
        protected override void ProcessGameStartMessage(Jid from, GameStartMessage gameStartMessage)
        {
            _bots[gameStartMessage.GameId].GameStart(new GameStartInfo
            {
                GameId = gameStartMessage.GameId,
                MaxMoves = gameStartMessage.MaxMoves,
                Player1 = gameStartMessage.Player1,
                Player2 = gameStartMessage.Player2,
                AllowBubbles = gameStartMessage.AllowBubbles,
                DynamiteCount = gameStartMessage.DynamiteCount
            });

            base.ProcessGameStartMessage(from, gameStartMessage);
        }
        private void GameStartedHandler(object sender, GameStartEventArgs e)
        {
            var gameStartXml = new GameStartMessage
            {
                MaxMoves = e.GameInfo.MaxMoves,
                Player1 = e.GameInfo.Player1,
                Player2 = e.GameInfo.Player2,
                GameId = e.GameInfo.GameId,
                AllowBubbles = e.GameInfo.AllowBubbles,
                DynamiteCount = e.GameInfo.DynamiteCount
            }.ToXml();

            Connection.Send(new Message(e.GameInfo.Player1, gameStartXml));
            Connection.Send(new Message(e.GameInfo.Player2, gameStartXml));
        }
Exemplo n.º 3
0
 protected virtual void ProcessGameStartMessage(Jid from, GameStartMessage gameStartMessage)
 {
 }