diff --git a/Better Together/Better Together/UIViews/CharacterManager.swift b/Better Together/Better Together/UIViews/CharacterManager.swift index ed43b951a6d5c49502ad29778004983109090384..133015d6faca3e32a0a46fe5ab525f06eed5feae 100644 --- a/Better Together/Better Together/UIViews/CharacterManager.swift +++ b/Better Together/Better Together/UIViews/CharacterManager.swift @@ -97,9 +97,15 @@ class CharacterManager { return nil } + private static let numberOfSendImageNames = 3 + // In multiplayer mode we only exchange the name of 3 images (body,arm,hand) beacuse of perfomance reasons. + // This function reconstructs the howl cusomozation (which includes images for 9 body parts) out of the 3 image names. + /// This function reconstructs the howl cusomozation (which includes images for 9 body parts) out of the 3 image names. + /// - Parameter config: the 3 images names received + /// - Returns: The 9 image names for each body part. static func getCompleteCustomization(for config: [String]?) -> [String]? { guard config != nil else { return nil } - guard config!.count == 3 else { return nil } + guard config!.count == numberOfSendImageNames else { return nil } let Body = config![0] let LeftUpperArm = config![1] let LeftLowerArm = config![1]