mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
- Creating separate files for different Items
This commit is contained in:
parent
0830292975
commit
f19d8141a4
19
swift/Sources/GildedRose/Items/AgedBrieItem.swift
Normal file
19
swift/Sources/GildedRose/Items/AgedBrieItem.swift
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Manali Mogre on 16/08/2020.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct AgedBrieItem: CustomisedItemProtocol {
|
||||
var item: Item
|
||||
|
||||
public init(item: Item) {
|
||||
self.item = item
|
||||
}
|
||||
func updateCustomItemQuality() {
|
||||
|
||||
}
|
||||
}
|
||||
19
swift/Sources/GildedRose/Items/BackstagePassesItem.swift
Normal file
19
swift/Sources/GildedRose/Items/BackstagePassesItem.swift
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Manali Mogre on 16/08/2020.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct BackstagePassesItem: CustomisedItemProtocol {
|
||||
var item: Item
|
||||
|
||||
public init(item: Item) {
|
||||
self.item = item
|
||||
}
|
||||
func updateCustomItemQuality() {
|
||||
|
||||
}
|
||||
}
|
||||
14
swift/Sources/GildedRose/Items/CustomisedItem.swift
Normal file
14
swift/Sources/GildedRose/Items/CustomisedItem.swift
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Manali Mogre on 16/08/2020.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
protocol CustomisedItemProtocol {
|
||||
func updateCustomItemQuality()
|
||||
}
|
||||
|
||||
|
||||
20
swift/Sources/GildedRose/Items/StandardItem.swift
Normal file
20
swift/Sources/GildedRose/Items/StandardItem.swift
Normal file
@ -0,0 +1,20 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Manali Mogre on 16/08/2020.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct StandardItem: CustomisedItemProtocol {
|
||||
|
||||
var item: Item
|
||||
|
||||
public init(item: Item) {
|
||||
self.item = item
|
||||
}
|
||||
func updateCustomItemQuality() {
|
||||
|
||||
}
|
||||
}
|
||||
19
swift/Sources/GildedRose/Items/SulfurasItem.swift
Normal file
19
swift/Sources/GildedRose/Items/SulfurasItem.swift
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Manali Mogre on 16/08/2020.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct SulfurasItem: CustomisedItemProtocol {
|
||||
var item: Item
|
||||
|
||||
public init(item: Item) {
|
||||
self.item = item
|
||||
}
|
||||
func updateCustomItemQuality() {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user