Ejemplo n.º 1
0
        public bool SendGameStateMessage(GameState state)
        {
            var socket = _communicationSockets[state.Player.ID];

            if (!socket.Connected)
            {
                return(false);
            }
            var message = new Message(MessageType.GameState, SerializationUtilities.ToByteArray(state));

            Message.SendMessage(message, socket);
            return(true);
        }
Ejemplo n.º 2
0
        public void SendAttackRequest(NodeUpgradeRequest request)
        {
            var message = new Message(MessageType.NodeUpgradeRequest, SerializationUtilities.ToByteArray(request));

            Message.SendMessage(message, _commsSocket);
        }