├── .gitignore ├── CardGame ├── Assets.xcassets │ ├── Contents.json │ ├── cardDone.imageset │ │ ├── cardDone.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Model │ ├── StupidGame.swift │ ├── Card.swift │ └── PlayingCard.swift ├── PlayingCardDeck.swift ├── CardView.swift ├── Deck.swift ├── Controller │ └── CardGameController.swift ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard.xml │ └── Main.storyboard.xml └── AppDelegate.swift ├── CardGame.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata.xml └── project.pbxproj └── cardDiagram.uxf /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata -------------------------------------------------------------------------------- /CardGame/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CardGame/Assets.xcassets/cardDone.imageset/cardDone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Petersoj/CardGame/master/CardGame/Assets.xcassets/cardDone.imageset/cardDone.png -------------------------------------------------------------------------------- /CardGame.xcodeproj/project.xcworkspace/contents.xcworkspacedata.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CardGame/Assets.xcassets/cardDone.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cardDone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CardGame/Model/StupidGame.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StupidGame.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 11/11/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class StupidGame{ 12 | 13 | internal var gameDeck: PlayingCardDeck 14 | internal var score: Int 15 | 16 | init(){ 17 | gameDeck = PlayingCardDeck() 18 | score = 0 19 | } 20 | 21 | func startGame() -> Void{ 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /CardGame/PlayingCardDeck.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlayingCardDeck.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 10/31/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class PlayingCardDeck: Deck{ 12 | 13 | 14 | override init(){ 15 | super.init() 16 | 17 | for suit in PlayingCard.validSuits(){ 18 | for var rank = 1; rank <= PlayingCard.maxRank(); rank += 1 { 19 | let tempCard = PlayingCard(withRank: rank, ofSuit: suit) 20 | cards.append(tempCard) 21 | } 22 | } 23 | } 24 | 25 | func orderDeck() -> Void{ 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /CardGame/Model/Card.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Card.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 10/25/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // Created with the assistants of C0dee H3nR1ksun 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | class Card { 13 | 14 | internal var backImage: UIImage 15 | internal var isFaceUp: Bool 16 | 17 | init(){ 18 | backImage = UIImage(named: "cardDone")! 19 | isFaceUp = false 20 | } 21 | 22 | func getBackImage() -> UIImage{ 23 | return backImage 24 | } 25 | func setBackImage(backImage: UIImage){ 26 | self.backImage = backImage 27 | } 28 | 29 | 30 | func isFacingUp() -> Bool{ 31 | return isFaceUp 32 | } 33 | func setFacingUp(face: Bool){ 34 | self.isFaceUp = face 35 | } 36 | 37 | func toString() -> String{ 38 | let description = "This card is facing \(isFaceUp) and \(self.getBackImage()) is the image" 39 | return description 40 | } 41 | } -------------------------------------------------------------------------------- /CardGame/CardView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardView.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 11/21/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable class CardView: UIView { 12 | 13 | internal var frontImage: UIImageView 14 | internal var backImage: UIImageView 15 | @IBInspectable internal var isFaceUp: Bool 16 | @IBInspectable internal var cornerCurve: CGFloat 17 | internal var bottomLabel: UILabel 18 | internal var topLabel: UILabel 19 | 20 | init(){ 21 | frontImage = UIImageView() 22 | backImage = UIImageView() 23 | isFaceUp = Bool() 24 | cornerCurve = CGFloat() 25 | bottomLabel = UILabel() 26 | topLabel = UILabel() 27 | super.init(frame: CGRect(x: 0, y: 0, width: 400, height: 800)) 28 | } 29 | 30 | required init?(coder acoder: NSCoder) { 31 | frontImage = UIImageView() 32 | backImage = UIImageView() 33 | isFaceUp = Bool() 34 | cornerCurve = CGFloat() 35 | bottomLabel = UILabel() 36 | topLabel = UILabel() 37 | super.init(coder: acoder) 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /CardGame/Deck.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Deck.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 10/31/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // Created with the help from Cody Henrichsen 8 | 9 | import Foundation 10 | 11 | class Deck{ 12 | 13 | internal lazy var cards = [Card]() 14 | 15 | func shuffleDeck() -> Void{ 16 | var tempDeck = [Card]() 17 | while self.cards.count > 0{ 18 | let randomIndex = Int(arc4random() % (UInt32)(cards.count)) 19 | let removedCard = cards.removeAtIndex(randomIndex) 20 | tempDeck.append(removedCard) 21 | } 22 | self.cards = tempDeck 23 | } 24 | 25 | func cutDeck() -> Void{ 26 | 27 | } 28 | 29 | func drawCard() -> Card!{ 30 | if cards.count > 0{ 31 | return cards.removeAtIndex(0) 32 | }else{ 33 | return nil 34 | } 35 | } 36 | 37 | func drawRandomCard() -> Card!{ 38 | if cards.count > 0{ 39 | let randomIndex = Int(arc4random() % (UInt32(cards.count))) 40 | return cards.removeAtIndex(randomIndex) 41 | }else{ 42 | return nil 43 | } 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /CardGame/Controller/CardGameController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardGameController.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 10/27/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CardGameController: UIViewController { 12 | 13 | private lazy var clickCount = Int() 14 | private lazy var cardDeck = PlayingCardDeck() 15 | 16 | @IBOutlet weak var cardLabel: UILabel! 17 | @IBOutlet weak var cardButton: UIButton! 18 | 19 | override func viewDidLoad() -> Void{ 20 | let tempCard = Card() 21 | print(tempCard.toString()) 22 | } 23 | 24 | override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { 25 | print("\(self.view.frame)") 26 | } 27 | 28 | @IBAction func cardClick(sender: UIButton) { 29 | self.clickCount += 1 30 | 31 | let content = "You clicked \(clickCount) times!" 32 | 33 | if let currentCard = cardDeck.drawRandomCard() as? PlayingCard{ 34 | cardButton.setTitle(currentCard.getCardData(), forState: .Normal) 35 | }else{ 36 | cardButton.setTitle("deck over", forState: .Normal) 37 | } 38 | 39 | cardLabel.text = content 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /CardGame/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /CardGame/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /CardGame/Base.lproj/LaunchScreen.storyboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CardGame/Model/PlayingCard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlayingCard.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 10/25/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | class PlayingCard : Card { 13 | 14 | internal var rank : Int 15 | internal var suit : String 16 | internal var color : UIColor 17 | 18 | override init(){ 19 | suit = "" 20 | color = UIColor.redColor() 21 | rank = 0 22 | super.init() 23 | } 24 | 25 | init(withRank: Int, ofSuit: String){ 26 | color = UIColor.redColor() 27 | suit = ofSuit 28 | rank = withRank 29 | super.init() 30 | } 31 | 32 | func getRank() -> Int{ 33 | return rank 34 | } 35 | 36 | func getSuit() -> String{ 37 | return suit 38 | } 39 | 40 | func getCardData() -> String{ 41 | return "\(PlayingCard.validRanks()[rank]) \(suit)" 42 | } 43 | 44 | func getColor() -> UIColor{ 45 | return color 46 | } 47 | 48 | override func toString() -> String { 49 | let description = "PlayerCard has Rank: \(rank), Suit: \(suit), and Color: \(color.description)" 50 | return description 51 | } 52 | 53 | //The Class modifier makes it so the moethod is visible without an instance 54 | //You would call it by ClassName.method() 55 | //In this case PlayingCard.validRanks() 56 | class func validRanks() -> [String]{ 57 | return ["??","A","1","2","3","4","5","6","7","8","9","10","J","Q","K"] 58 | } 59 | 60 | class func maxRank() -> Int{ 61 | return validRanks().count - 1 62 | } 63 | 64 | class func validSuits() -> [String]{ 65 | return ["♦️","♣️","♥️","♠️"] 66 | } 67 | } -------------------------------------------------------------------------------- /CardGame/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CardGame 4 | // 5 | // Created by Peterson, Jacob on 10/25/16. 6 | // Copyright © 2016 Peterson, Jacob. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /cardDiagram.uxf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 4 | 5 | UMLClass 6 | 7 | 240 8 | 190 9 | 260 10 | 160 11 | 12 | CardGame.Model::Deck 13 | -- 14 | cards : [Card] 15 | -- 16 | + init 17 | +shuffleDeck(): Void 18 | + cutDeck : Void 19 | bg=blue 20 | 21 | 22 | 23 | UMLClass 24 | 25 | 680 26 | 200 27 | 290 28 | 190 29 | 30 | CardGame.Model::Card 31 | -- 32 | - backImage : UIImage 33 | - isFaceUp : Bool 34 | -- 35 | + getBackImage(): UIImage 36 | + getFace() : Bool 37 | + init() : Initializer 38 | + toString : String 39 | 40 | 41 | 42 | UMLClass 43 | 44 | 590 45 | 440 46 | 330 47 | 180 48 | 49 | CardGame.Model::PlayingCard 50 | -- 51 | - rank : Int 52 | - suit : String 53 | - color : UIColor 54 | -- 55 | + getRank() : Int 56 | + getSuit() : String 57 | + getColor() : UIColor 58 | + init() : Initializer 59 | + toString() : String 60 | 61 | 62 | 63 | Relation 64 | 65 | 800 66 | 380 67 | 30 68 | 80 69 | 70 | lt=<<- 71 | 10.0;10.0;10.0;60.0 72 | 73 | 74 | UMLClass 75 | 76 | 200 77 | 500 78 | 290 79 | 110 80 | 81 | CardGame.Model::PlayingCardDeck 82 | -- 83 | - cards : [PlayingCard] : [PlayingCard] 84 | -- 85 | +orderDeck(): Void 86 | bg=green 87 | 88 | 89 | 90 | Relation 91 | 92 | 350 93 | 340 94 | 30 95 | 180 96 | 97 | lt=<<- 98 | 10.0;10.0;10.0;160.0 99 | 100 | 101 | Relation 102 | 103 | 480 104 | 550 105 | 130 106 | 40 107 | 108 | lt=<<<<<- 109 | m1=1 110 | m2=52 111 | 10.0;10.0;110.0;10.0 112 | 113 | 114 | Relation 115 | 116 | 490 117 | 230 118 | 210 119 | 120 120 | 121 | lt=<<<<<- 122 | m1=1 123 | m2=n 124 | 10.0;10.0;190.0;100.0 125 | 126 | 127 | -------------------------------------------------------------------------------- /CardGame.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 371670F51DC7C45D008A4AD0 /* Deck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371670F41DC7C45D008A4AD0 /* Deck.swift */; }; 11 | 371670F71DC7C46A008A4AD0 /* PlayingCardDeck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371670F61DC7C46A008A4AD0 /* PlayingCardDeck.swift */; }; 12 | 372D02851DC27DB100B99B70 /* CardGameController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372D02841DC27DB100B99B70 /* CardGameController.swift */; }; 13 | 375D229C1DD657870064340B /* StupidGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 375D229B1DD657870064340B /* StupidGame.swift */; }; 14 | 3785C9BB1DBFE3F300D8ECBA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3785C9BA1DBFE3F300D8ECBA /* AppDelegate.swift */; }; 15 | 3785C9C01DBFE3F300D8ECBA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3785C9BE1DBFE3F300D8ECBA /* Main.storyboard */; }; 16 | 3785C9C21DBFE3F300D8ECBA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3785C9C11DBFE3F300D8ECBA /* Assets.xcassets */; }; 17 | 3785C9C51DBFE3F300D8ECBA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3785C9C31DBFE3F300D8ECBA /* LaunchScreen.storyboard */; }; 18 | 3785C9CD1DBFE5CD00D8ECBA /* Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3785C9CC1DBFE5CD00D8ECBA /* Card.swift */; }; 19 | 3785C9CF1DBFE60C00D8ECBA /* PlayingCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3785C9CE1DBFE60C00D8ECBA /* PlayingCard.swift */; }; 20 | 37E5D1711DE38E190024B36C /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E5D1701DE38E190024B36C /* CardView.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 371670F41DC7C45D008A4AD0 /* Deck.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Deck.swift; sourceTree = ""; }; 25 | 371670F61DC7C46A008A4AD0 /* PlayingCardDeck.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayingCardDeck.swift; sourceTree = ""; }; 26 | 372D02841DC27DB100B99B70 /* CardGameController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CardGameController.swift; path = Controller/CardGameController.swift; sourceTree = ""; }; 27 | 375D229B1DD657870064340B /* StupidGame.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StupidGame.swift; path = Model/StupidGame.swift; sourceTree = ""; }; 28 | 3785C9B71DBFE3F300D8ECBA /* CardGame.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CardGame.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 3785C9BA1DBFE3F300D8ECBA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 30 | 3785C9BF1DBFE3F300D8ECBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 31 | 3785C9C11DBFE3F300D8ECBA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 32 | 3785C9C41DBFE3F300D8ECBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 33 | 3785C9C61DBFE3F300D8ECBA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | 3785C9CC1DBFE5CD00D8ECBA /* Card.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Card.swift; path = Model/Card.swift; sourceTree = ""; }; 35 | 3785C9CE1DBFE60C00D8ECBA /* PlayingCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PlayingCard.swift; path = Model/PlayingCard.swift; sourceTree = ""; }; 36 | 37E5D1701DE38E190024B36C /* CardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = ""; }; 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 3785C9B41DBFE3F300D8ECBA /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 372D02861DC27DEA00B99B70 /* Controller */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 372D02841DC27DB100B99B70 /* CardGameController.swift */, 54 | ); 55 | name = Controller; 56 | sourceTree = ""; 57 | }; 58 | 3785C9AE1DBFE3F300D8ECBA = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3785C9B91DBFE3F300D8ECBA /* CardGame */, 62 | 3785C9B81DBFE3F300D8ECBA /* Products */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | 3785C9B81DBFE3F300D8ECBA /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 3785C9B71DBFE3F300D8ECBA /* CardGame.app */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | 3785C9B91DBFE3F300D8ECBA /* CardGame */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 3785C9BA1DBFE3F300D8ECBA /* AppDelegate.swift */, 78 | 3785C9C61DBFE3F300D8ECBA /* Info.plist */, 79 | 3785C9D11DBFE68400D8ECBA /* View */, 80 | 3785C9D01DBFE66100D8ECBA /* Model */, 81 | 372D02861DC27DEA00B99B70 /* Controller */, 82 | ); 83 | path = CardGame; 84 | sourceTree = ""; 85 | }; 86 | 3785C9D01DBFE66100D8ECBA /* Model */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 3785C9CC1DBFE5CD00D8ECBA /* Card.swift */, 90 | 3785C9CE1DBFE60C00D8ECBA /* PlayingCard.swift */, 91 | 371670F41DC7C45D008A4AD0 /* Deck.swift */, 92 | 371670F61DC7C46A008A4AD0 /* PlayingCardDeck.swift */, 93 | 375D229B1DD657870064340B /* StupidGame.swift */, 94 | ); 95 | name = Model; 96 | sourceTree = ""; 97 | }; 98 | 3785C9D11DBFE68400D8ECBA /* View */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 3785C9BE1DBFE3F300D8ECBA /* Main.storyboard */, 102 | 3785C9C11DBFE3F300D8ECBA /* Assets.xcassets */, 103 | 3785C9C31DBFE3F300D8ECBA /* LaunchScreen.storyboard */, 104 | 37E5D1701DE38E190024B36C /* CardView.swift */, 105 | ); 106 | name = View; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 3785C9B61DBFE3F300D8ECBA /* CardGame */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 3785C9C91DBFE3F300D8ECBA /* Build configuration list for PBXNativeTarget "CardGame" */; 115 | buildPhases = ( 116 | 3785C9B31DBFE3F300D8ECBA /* Sources */, 117 | 3785C9B41DBFE3F300D8ECBA /* Frameworks */, 118 | 3785C9B51DBFE3F300D8ECBA /* Resources */, 119 | ); 120 | buildRules = ( 121 | ); 122 | dependencies = ( 123 | ); 124 | name = CardGame; 125 | productName = CardGame; 126 | productReference = 3785C9B71DBFE3F300D8ECBA /* CardGame.app */; 127 | productType = "com.apple.product-type.application"; 128 | }; 129 | /* End PBXNativeTarget section */ 130 | 131 | /* Begin PBXProject section */ 132 | 3785C9AF1DBFE3F300D8ECBA /* Project object */ = { 133 | isa = PBXProject; 134 | attributes = { 135 | LastSwiftUpdateCheck = 0720; 136 | LastUpgradeCheck = 0810; 137 | ORGANIZATIONNAME = "Peterson, Jacob"; 138 | TargetAttributes = { 139 | 3785C9B61DBFE3F300D8ECBA = { 140 | CreatedOnToolsVersion = 7.2; 141 | }; 142 | }; 143 | }; 144 | buildConfigurationList = 3785C9B21DBFE3F300D8ECBA /* Build configuration list for PBXProject "CardGame" */; 145 | compatibilityVersion = "Xcode 3.2"; 146 | developmentRegion = English; 147 | hasScannedForEncodings = 0; 148 | knownRegions = ( 149 | en, 150 | Base, 151 | ); 152 | mainGroup = 3785C9AE1DBFE3F300D8ECBA; 153 | productRefGroup = 3785C9B81DBFE3F300D8ECBA /* Products */; 154 | projectDirPath = ""; 155 | projectRoot = ""; 156 | targets = ( 157 | 3785C9B61DBFE3F300D8ECBA /* CardGame */, 158 | ); 159 | }; 160 | /* End PBXProject section */ 161 | 162 | /* Begin PBXResourcesBuildPhase section */ 163 | 3785C9B51DBFE3F300D8ECBA /* Resources */ = { 164 | isa = PBXResourcesBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | 3785C9C51DBFE3F300D8ECBA /* LaunchScreen.storyboard in Resources */, 168 | 3785C9C21DBFE3F300D8ECBA /* Assets.xcassets in Resources */, 169 | 3785C9C01DBFE3F300D8ECBA /* Main.storyboard in Resources */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXResourcesBuildPhase section */ 174 | 175 | /* Begin PBXSourcesBuildPhase section */ 176 | 3785C9B31DBFE3F300D8ECBA /* Sources */ = { 177 | isa = PBXSourcesBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | 3785C9CD1DBFE5CD00D8ECBA /* Card.swift in Sources */, 181 | 3785C9CF1DBFE60C00D8ECBA /* PlayingCard.swift in Sources */, 182 | 371670F51DC7C45D008A4AD0 /* Deck.swift in Sources */, 183 | 371670F71DC7C46A008A4AD0 /* PlayingCardDeck.swift in Sources */, 184 | 375D229C1DD657870064340B /* StupidGame.swift in Sources */, 185 | 3785C9BB1DBFE3F300D8ECBA /* AppDelegate.swift in Sources */, 186 | 37E5D1711DE38E190024B36C /* CardView.swift in Sources */, 187 | 372D02851DC27DB100B99B70 /* CardGameController.swift in Sources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXSourcesBuildPhase section */ 192 | 193 | /* Begin PBXVariantGroup section */ 194 | 3785C9BE1DBFE3F300D8ECBA /* Main.storyboard */ = { 195 | isa = PBXVariantGroup; 196 | children = ( 197 | 3785C9BF1DBFE3F300D8ECBA /* Base */, 198 | ); 199 | name = Main.storyboard; 200 | sourceTree = ""; 201 | }; 202 | 3785C9C31DBFE3F300D8ECBA /* LaunchScreen.storyboard */ = { 203 | isa = PBXVariantGroup; 204 | children = ( 205 | 3785C9C41DBFE3F300D8ECBA /* Base */, 206 | ); 207 | name = LaunchScreen.storyboard; 208 | sourceTree = ""; 209 | }; 210 | /* End PBXVariantGroup section */ 211 | 212 | /* Begin XCBuildConfiguration section */ 213 | 3785C9C71DBFE3F300D8ECBA /* Debug */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 218 | CLANG_CXX_LIBRARY = "libc++"; 219 | CLANG_ENABLE_MODULES = YES; 220 | CLANG_ENABLE_OBJC_ARC = YES; 221 | CLANG_WARN_BOOL_CONVERSION = YES; 222 | CLANG_WARN_CONSTANT_CONVERSION = YES; 223 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 224 | CLANG_WARN_EMPTY_BODY = YES; 225 | CLANG_WARN_ENUM_CONVERSION = YES; 226 | CLANG_WARN_INFINITE_RECURSION = YES; 227 | CLANG_WARN_INT_CONVERSION = YES; 228 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 229 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 230 | CLANG_WARN_UNREACHABLE_CODE = YES; 231 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 232 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 233 | COPY_PHASE_STRIP = NO; 234 | DEBUG_INFORMATION_FORMAT = dwarf; 235 | ENABLE_STRICT_OBJC_MSGSEND = YES; 236 | ENABLE_TESTABILITY = YES; 237 | GCC_C_LANGUAGE_STANDARD = gnu99; 238 | GCC_DYNAMIC_NO_PIC = NO; 239 | GCC_NO_COMMON_BLOCKS = YES; 240 | GCC_OPTIMIZATION_LEVEL = 0; 241 | GCC_PREPROCESSOR_DEFINITIONS = ( 242 | "DEBUG=1", 243 | "$(inherited)", 244 | ); 245 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 246 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 247 | GCC_WARN_UNDECLARED_SELECTOR = YES; 248 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 249 | GCC_WARN_UNUSED_FUNCTION = YES; 250 | GCC_WARN_UNUSED_VARIABLE = YES; 251 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 252 | MTL_ENABLE_DEBUG_INFO = YES; 253 | ONLY_ACTIVE_ARCH = YES; 254 | SDKROOT = iphoneos; 255 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 256 | TARGETED_DEVICE_FAMILY = "1,2"; 257 | }; 258 | name = Debug; 259 | }; 260 | 3785C9C81DBFE3F300D8ECBA /* Release */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | ALWAYS_SEARCH_USER_PATHS = NO; 264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 265 | CLANG_CXX_LIBRARY = "libc++"; 266 | CLANG_ENABLE_MODULES = YES; 267 | CLANG_ENABLE_OBJC_ARC = YES; 268 | CLANG_WARN_BOOL_CONVERSION = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INFINITE_RECURSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 276 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 277 | CLANG_WARN_UNREACHABLE_CODE = YES; 278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 279 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 280 | COPY_PHASE_STRIP = NO; 281 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 282 | ENABLE_NS_ASSERTIONS = NO; 283 | ENABLE_STRICT_OBJC_MSGSEND = YES; 284 | GCC_C_LANGUAGE_STANDARD = gnu99; 285 | GCC_NO_COMMON_BLOCKS = YES; 286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 288 | GCC_WARN_UNDECLARED_SELECTOR = YES; 289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 290 | GCC_WARN_UNUSED_FUNCTION = YES; 291 | GCC_WARN_UNUSED_VARIABLE = YES; 292 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 293 | MTL_ENABLE_DEBUG_INFO = NO; 294 | SDKROOT = iphoneos; 295 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 296 | TARGETED_DEVICE_FAMILY = "1,2"; 297 | VALIDATE_PRODUCT = YES; 298 | }; 299 | name = Release; 300 | }; 301 | 3785C9CA1DBFE3F300D8ECBA /* Debug */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 305 | INFOPLIST_FILE = CardGame/Info.plist; 306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 307 | PRODUCT_BUNDLE_IDENTIFIER = cardGame.CardGame; 308 | PRODUCT_NAME = "$(TARGET_NAME)"; 309 | }; 310 | name = Debug; 311 | }; 312 | 3785C9CB1DBFE3F300D8ECBA /* Release */ = { 313 | isa = XCBuildConfiguration; 314 | buildSettings = { 315 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 316 | INFOPLIST_FILE = CardGame/Info.plist; 317 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 318 | PRODUCT_BUNDLE_IDENTIFIER = cardGame.CardGame; 319 | PRODUCT_NAME = "$(TARGET_NAME)"; 320 | }; 321 | name = Release; 322 | }; 323 | /* End XCBuildConfiguration section */ 324 | 325 | /* Begin XCConfigurationList section */ 326 | 3785C9B21DBFE3F300D8ECBA /* Build configuration list for PBXProject "CardGame" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 3785C9C71DBFE3F300D8ECBA /* Debug */, 330 | 3785C9C81DBFE3F300D8ECBA /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | 3785C9C91DBFE3F300D8ECBA /* Build configuration list for PBXNativeTarget "CardGame" */ = { 336 | isa = XCConfigurationList; 337 | buildConfigurations = ( 338 | 3785C9CA1DBFE3F300D8ECBA /* Debug */, 339 | 3785C9CB1DBFE3F300D8ECBA /* Release */, 340 | ); 341 | defaultConfigurationIsVisible = 0; 342 | defaultConfigurationName = Release; 343 | }; 344 | /* End XCConfigurationList section */ 345 | }; 346 | rootObject = 3785C9AF1DBFE3F300D8ECBA /* Project object */; 347 | } 348 | -------------------------------------------------------------------------------- /CardGame/Base.lproj/Main.storyboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 31 | 42 | 53 | 64 | 75 | 86 | 94 | 105 | 116 | 127 | 136 | 147 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | --------------------------------------------------------------------------------