From cbde74b661936856f19734a94bc0b96ea05699f3 Mon Sep 17 00:00:00 2001 From: Anton Siauruk Date: Thu, 24 Nov 2022 00:09:57 -0600 Subject: [PATCH 1/3] [Update README.md] Fixes the camel case --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a743672..8f1a7e9 100644 --- a/README.md +++ b/README.md @@ -1142,7 +1142,7 @@ protocol NewDeathStarSuperLaserAiming { **Adaptee** ```swift -struct OldDeathStarSuperlaserTarget { +struct OldDeathStarSuperLaserTarget { let angleHorizontal: Float let angleVertical: Float @@ -1156,9 +1156,9 @@ struct OldDeathStarSuperlaserTarget { **Adapter** ```swift -struct NewDeathStarSuperlaserTarget: NewDeathStarSuperLaserAiming { +struct NewDeathStarSuperLaserTarget: NewDeathStarSuperLaserAiming { - private let target: OldDeathStarSuperlaserTarget + private let target: OldDeathStarSuperLaserTarget var angleV: Double { return Double(target.angleVertical) @@ -1168,7 +1168,7 @@ struct NewDeathStarSuperlaserTarget: NewDeathStarSuperLaserAiming { return Double(target.angleHorizontal) } - init(_ target: OldDeathStarSuperlaserTarget) { + init(_ target: OldDeathStarSuperLaserTarget) { self.target = target } } @@ -1177,8 +1177,8 @@ struct NewDeathStarSuperlaserTarget: NewDeathStarSuperLaserAiming { ### Usage ```swift -let target = OldDeathStarSuperlaserTarget(angleHorizontal: 14.0, angleVertical: 12.0) -let newFormat = NewDeathStarSuperlaserTarget(target) +let target = OldDeathStarSuperLaserTarget(angleHorizontal: 14.0, angleVertical: 12.0) +let newFormat = NewDeathStarSuperLaserTarget(target) newFormat.angleH newFormat.angleV From 9a794923914b4126a72eb471897143ed43035bfc Mon Sep 17 00:00:00 2001 From: Anton Siauruk Date: Thu, 24 Nov 2022 00:20:01 -0600 Subject: [PATCH 2/3] Run generate-playground.sh --- Design-Patterns.playground.zip | Bin 199169 -> 199169 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Design-Patterns.playground.zip b/Design-Patterns.playground.zip index c997652de86ab08fb629e3d5c6c8cf5ccf27fd62..617c684c74663d660e61e12cb867e6f13dc375c4 100644 GIT binary patch delta 309 zcmZpi!qYf~hcCdJnT3l11l}@Mgiho$WdYHR?pxg%SLTD+)4$|1TC=1wRfJAIIFZqC z+7Bj~=?w*pTwtN?eFcn}A_&>(bw8NorVC7Bf-;jBe{(_1wrycF zoUZVPNq_p>7RIRUSLZUmFM=pPA;1&_Q7$LQR6P-*eC{G9S1@b)vqelxf+2!^-KWjCVwWlpwx8n-!Rn~znMxQWX|Co&pN`@tkL zy`g}S3oNv~uYfUA1R*=U?gx|Hbb(2X91!WSR>pK5xO6x~P-YV2Z;1Bkwk?c?(-rRiV6MG)mD1ek&#%H;%^swYAO=PqJ$g$O=d#Iz(BBG~th$s5A5|G^|R z{rfj2UkKOZJJV;lL^_zYebo;pe!2%ckN HHf9F^s10n! From 2b3c7f38e629be69758a6064df8ce1cc5eecf6fb Mon Sep 17 00:00:00 2001 From: Anton Siauruk Date: Thu, 24 Nov 2022 00:21:46 -0600 Subject: [PATCH 3/3] Fixes the camel case --- .../Pages/Structural.xcplaygroundpage/Contents.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Design-Patterns.playground/Pages/Structural.xcplaygroundpage/Contents.swift b/Design-Patterns.playground/Pages/Structural.xcplaygroundpage/Contents.swift index 29c0ef1..7e558af 100644 --- a/Design-Patterns.playground/Pages/Structural.xcplaygroundpage/Contents.swift +++ b/Design-Patterns.playground/Pages/Structural.xcplaygroundpage/Contents.swift @@ -30,7 +30,7 @@ protocol NewDeathStarSuperLaserAiming { /*: **Adaptee** */ -struct OldDeathStarSuperlaserTarget { +struct OldDeathStarSuperLaserTarget { let angleHorizontal: Float let angleVertical: Float @@ -42,9 +42,9 @@ struct OldDeathStarSuperlaserTarget { /*: **Adapter** */ -struct NewDeathStarSuperlaserTarget: NewDeathStarSuperLaserAiming { +struct NewDeathStarSuperLaserTarget: NewDeathStarSuperLaserAiming { - private let target: OldDeathStarSuperlaserTarget + private let target: OldDeathStarSuperLaserTarget var angleV: Double { return Double(target.angleVertical) @@ -54,15 +54,15 @@ struct NewDeathStarSuperlaserTarget: NewDeathStarSuperLaserAiming { return Double(target.angleHorizontal) } - init(_ target: OldDeathStarSuperlaserTarget) { + init(_ target: OldDeathStarSuperLaserTarget) { self.target = target } } /*: ### Usage */ -let target = OldDeathStarSuperlaserTarget(angleHorizontal: 14.0, angleVertical: 12.0) -let newFormat = NewDeathStarSuperlaserTarget(target) +let target = OldDeathStarSuperLaserTarget(angleHorizontal: 14.0, angleVertical: 12.0) +let newFormat = NewDeathStarSuperLaserTarget(target) newFormat.angleH newFormat.angleV