Skip to content

Commit 2f007e8

Browse files
author
Oktawian Chojnacki
committed
New lines here and there.
1 parent 921e7f0 commit 2f007e8

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

Design-Patterns.playground/Pages/Behavioral.xcplaygroundpage/Contents.swift

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Behavioral
1010
>**Source:** [wikipedia.org](http://en.wikipedia.org/wiki/Behavioral_pattern)
1111
*/
1212
import Swift
13-
import Foundation/*:
13+
import Foundation
14+
/*:
1415
🐝 Chain Of Responsibility
1516
--------------------------
1617

@@ -166,7 +167,6 @@ The interpreter pattern is used to evaluate sentences in a language.
166167

167168
### Example
168169
*/
169-
170170
protocol IntegerExp {
171171
func evaluate(context: IntegerContext) -> Int
172172
func replace(character: Character, integerExp: IntegerExp) -> IntegerExp
@@ -284,7 +284,6 @@ The mediator pattern is used to reduce coupling between classes that communicate
284284

285285
### Example
286286
*/
287-
288287
class Colleague {
289288
let mediator: Mediator
290289

@@ -326,11 +325,9 @@ class ConcreteColleague: Colleague {
326325
print("Colleague received: \(message)")
327326
}
328327
}
329-
330328
/*:
331329
### Usage
332330
*/
333-
334331
let messagesMediator = MessageMediator()
335332
let user0 = ConcreteColleague(mediator: messagesMediator)
336333
let user1 = ConcreteColleague(mediator: messagesMediator)
@@ -406,7 +403,6 @@ gameState.weapon = "Crossbow"
406403
CheckPoint.saveState(gameState.toMemento())
407404

408405
gameState.restoreFromMemento(CheckPoint.restorePreviousState(keyName: "gameState2"))
409-
410406
/*:
411407
👓 Observer
412408
-----------
@@ -558,7 +554,6 @@ lower.printString("O tempora, o mores!")
558554

559555
var upper = Printer(strategy:UpperCaseStrategy())
560556
upper.printString("O tempora, o mores!")
561-
562557
/*:
563558
🏃 Visitor
564559
----------

Design-Patterns.playground/Pages/Creational.xcplaygroundpage/Contents.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Creational
1010
>**Source:** [wikipedia.org](http://en.wikipedia.org/wiki/Creational_pattern)
1111
*/
1212
import Swift
13-
import Foundation/*:
13+
import Foundation
14+
/*:
1415
🌰 Abstract Factory
1516
-------------------
1617

Design-Patterns.playground/Pages/Structural.xcplaygroundpage/Contents.swift

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Structural
1010
>**Source:** [wikipedia.org](http://en.wikipedia.org/wiki/Structural_pattern)
1111
*/
1212
import Swift
13-
import Foundation/*:
13+
import Foundation
14+
/*:
1415
🔌 Adapter
1516
----------
1617

@@ -61,7 +62,7 @@ let oldFormat = OldDeathStarSuperlaserTarget(target)
6162
oldFormat.angleH
6263
oldFormat.angleV
6364
/*:
64-
🌉 Bridge
65+
🌉 Bridge
6566
----------
6667

6768
The bridge pattern is used to separate the abstract elements of a class from the implementation details, providing the means to replace the implementation details without modifying the abstraction.
@@ -124,7 +125,8 @@ protocol Shape {
124125
}
125126
/*:
126127
Leafs
127-
*/
128+
*/
129+
128130
class Square : Shape {
129131
func draw(fillColor: String) {
130132
print("Drawing a Square with color \(fillColor)")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Timeline
3+
version = "3.0">
4+
<TimelineItems>
5+
</TimelineItems>
6+
</Timeline>

README.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ A short cheat-sheet with Xcode 7beta Playground ([Design-Patterns.playground.zip
1111
* [Creational](#creational)
1212
* [Structural](#structural)
1313

14-
15-
```swift Behavioral |
16-
[Creational](Creational) |
17-
[Structural](Structural)
18-
```
19-
2014
Behavioral
2115
==========
2216

@@ -26,7 +20,8 @@ Behavioral
2620
2721
```swift
2822
import Swift
29-
import Foundation```
23+
import Foundation
24+
```
3025

3126
🐝 Chain Of Responsibility
3227
--------------------------

0 commit comments

Comments
 (0)