-
-
Save alskipp/b7fea13c971824f75191 to your computer and use it in GitHub Desktop.
Build a DeathStar without PFI sub-contractors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct DeathStar { | |
let guns:Int, cakes:Int, beer:Int | |
let troops:Int, toilets:Int, vendingMachines:Int | |
let commander:String | |
init(guns:Int, cakes:Int=0, beer:Int=0, troops:Int=1000, | |
toilets:Int=1, vendingMachines:Int=0, commander:String="Darth") { | |
self.guns = guns | |
self.cakes = cakes | |
self.beer = beer | |
self.troops = troops | |
self.toilets = toilets | |
self.vendingMachines = vendingMachines | |
self.commander = commander | |
} | |
} | |
let empire = DeathStar(guns:0, | |
beer:10_000, | |
vendingMachines:100, | |
cakes:1000, | |
commander:"Homer") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment