Exemple #1
0
        private void processMessage(string message)
        {
            Message analyzedMessage = MessageAnalyzer.Analyze(message);

            if (analyzedMessage.VectorCount == 2)
            {
                updatePlayersPositions(analyzedMessage.Vectors[0], analyzedMessage.Vectors[1]);
            }
            else if (analyzedMessage.VectorCount == 1)
            {
                updateBall(analyzedMessage.Vectors[0], analyzedMessage.Radius);
            }
        }