Ejemplo n.º 1
0
        internal static void TakeColor(int colorToTake, byte clientID)
        {
            if (!AvailablePlayerColors.Contains(colorToTake))
            {
                //TODO: Send player, that the color is already taken and to choose any color available
                ServerSend.PlayerTriedTakingAlreadyTakenColor(clientID, UnAvailablePlayerColors());
                return;
            }

            AvailablePlayerColors.Remove(colorToTake);
            ServerSend.ColorIsTaken(colorToTake, clientID);
        }