diff --git a/generala/generala.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate b/generala/generala.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate index c2357e3..94376b0 100644 Binary files a/generala/generala.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate and b/generala/generala.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/poker/poker/poker.xcodeproj/project.pbxproj b/poker/poker/poker.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9dd50f5 --- /dev/null +++ b/poker/poker/poker.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + BBE636EE244519F2000E01F0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636ED244519F2000E01F0 /* AppDelegate.swift */; }; + BBE636F0244519F2000E01F0 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636EF244519F2000E01F0 /* SceneDelegate.swift */; }; + BBE636F2244519F2000E01F0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636F1244519F2000E01F0 /* ViewController.swift */; }; + BBE636F5244519F2000E01F0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BBE636F3244519F2000E01F0 /* Main.storyboard */; }; + BBE636F7244519F8000E01F0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BBE636F6244519F8000E01F0 /* Assets.xcassets */; }; + BBE636FA244519F8000E01F0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BBE636F8244519F8000E01F0 /* LaunchScreen.storyboard */; }; + BBE6370224451A41000E01F0 /* Carta.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE6370124451A41000E01F0 /* Carta.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + BBE636EA244519F2000E01F0 /* poker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = poker.app; sourceTree = BUILT_PRODUCTS_DIR; }; + BBE636ED244519F2000E01F0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + BBE636EF244519F2000E01F0 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + BBE636F1244519F2000E01F0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + BBE636F4244519F2000E01F0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + BBE636F6244519F8000E01F0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + BBE636F9244519F8000E01F0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + BBE636FB244519F8000E01F0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BBE6370124451A41000E01F0 /* Carta.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Carta.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BBE636E7244519F2000E01F0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + BBE636E1244519F2000E01F0 = { + isa = PBXGroup; + children = ( + BBE636EC244519F2000E01F0 /* poker */, + BBE636EB244519F2000E01F0 /* Products */, + ); + sourceTree = ""; + }; + BBE636EB244519F2000E01F0 /* Products */ = { + isa = PBXGroup; + children = ( + BBE636EA244519F2000E01F0 /* poker.app */, + ); + name = Products; + sourceTree = ""; + }; + BBE636EC244519F2000E01F0 /* poker */ = { + isa = PBXGroup; + children = ( + BBE636ED244519F2000E01F0 /* AppDelegate.swift */, + BBE636EF244519F2000E01F0 /* SceneDelegate.swift */, + BBE636F1244519F2000E01F0 /* ViewController.swift */, + BBE636F3244519F2000E01F0 /* Main.storyboard */, + BBE636F6244519F8000E01F0 /* Assets.xcassets */, + BBE636F8244519F8000E01F0 /* LaunchScreen.storyboard */, + BBE636FB244519F8000E01F0 /* Info.plist */, + BBE6370124451A41000E01F0 /* Carta.swift */, + ); + path = poker; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + BBE636E9244519F2000E01F0 /* poker */ = { + isa = PBXNativeTarget; + buildConfigurationList = BBE636FE244519F8000E01F0 /* Build configuration list for PBXNativeTarget "poker" */; + buildPhases = ( + BBE636E6244519F2000E01F0 /* Sources */, + BBE636E7244519F2000E01F0 /* Frameworks */, + BBE636E8244519F2000E01F0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = poker; + productName = poker; + productReference = BBE636EA244519F2000E01F0 /* poker.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BBE636E2244519F2000E01F0 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1110; + LastUpgradeCheck = 1110; + ORGANIZATIONNAME = "Mobile Roshka"; + TargetAttributes = { + BBE636E9244519F2000E01F0 = { + CreatedOnToolsVersion = 11.1; + }; + }; + }; + buildConfigurationList = BBE636E5244519F2000E01F0 /* Build configuration list for PBXProject "poker" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = BBE636E1244519F2000E01F0; + productRefGroup = BBE636EB244519F2000E01F0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BBE636E9244519F2000E01F0 /* poker */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BBE636E8244519F2000E01F0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BBE636FA244519F8000E01F0 /* LaunchScreen.storyboard in Resources */, + BBE636F7244519F8000E01F0 /* Assets.xcassets in Resources */, + BBE636F5244519F2000E01F0 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + BBE636E6244519F2000E01F0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BBE636F2244519F2000E01F0 /* ViewController.swift in Sources */, + BBE6370224451A41000E01F0 /* Carta.swift in Sources */, + BBE636EE244519F2000E01F0 /* AppDelegate.swift in Sources */, + BBE636F0244519F2000E01F0 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + BBE636F3244519F2000E01F0 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BBE636F4244519F2000E01F0 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + BBE636F8244519F8000E01F0 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BBE636F9244519F8000E01F0 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + BBE636FC244519F8000E01F0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + BBE636FD244519F8000E01F0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + BBE636FF244519F8000E01F0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = poker/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.poker; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + BBE63700244519F8000E01F0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = poker/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.poker; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BBE636E5244519F2000E01F0 /* Build configuration list for PBXProject "poker" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BBE636FC244519F8000E01F0 /* Debug */, + BBE636FD244519F8000E01F0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BBE636FE244519F8000E01F0 /* Build configuration list for PBXNativeTarget "poker" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BBE636FF244519F8000E01F0 /* Debug */, + BBE63700244519F8000E01F0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BBE636E2244519F2000E01F0 /* Project object */; +} diff --git a/poker/poker/poker.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/poker/poker/poker.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2d78863 --- /dev/null +++ b/poker/poker/poker.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/poker/poker/poker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/poker/poker/poker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/poker/poker/poker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/poker/poker/poker.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate b/poker/poker/poker.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..ad37da7 Binary files /dev/null and b/poker/poker/poker.xcodeproj/project.xcworkspace/xcuserdata/roshka.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/poker/poker/poker.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/poker/poker/poker.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..6f50a05 --- /dev/null +++ b/poker/poker/poker.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/poker/poker/poker.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist b/poker/poker/poker.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..24adb7d --- /dev/null +++ b/poker/poker/poker.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + poker.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/poker/poker/poker/AppDelegate.swift b/poker/poker/poker/AppDelegate.swift new file mode 100644 index 0000000..65a66e7 --- /dev/null +++ b/poker/poker/poker/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// poker +// +// Created by Mobile Roshka on 4/13/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/poker/poker/poker/Assets.xcassets/AppIcon.appiconset/Contents.json b/poker/poker/poker/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/Contents.json b/poker/poker/poker/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/poker-C.imageset/Contents.json b/poker/poker/poker/Assets.xcassets/poker-C.imageset/Contents.json new file mode 100644 index 0000000..648a01e --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/poker-C.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "poker-C.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/poker-C.imageset/poker-C.png b/poker/poker/poker/Assets.xcassets/poker-C.imageset/poker-C.png new file mode 100644 index 0000000..8c80a84 Binary files /dev/null and b/poker/poker/poker/Assets.xcassets/poker-C.imageset/poker-C.png differ diff --git a/poker/poker/poker/Assets.xcassets/poker-D.imageset/Contents.json b/poker/poker/poker/Assets.xcassets/poker-D.imageset/Contents.json new file mode 100644 index 0000000..c7def2e --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/poker-D.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "poker-D.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/poker-D.imageset/poker-D.png b/poker/poker/poker/Assets.xcassets/poker-D.imageset/poker-D.png new file mode 100644 index 0000000..f9f20b5 Binary files /dev/null and b/poker/poker/poker/Assets.xcassets/poker-D.imageset/poker-D.png differ diff --git a/poker/poker/poker/Assets.xcassets/poker-E.imageset/Contents.json b/poker/poker/poker/Assets.xcassets/poker-E.imageset/Contents.json new file mode 100644 index 0000000..55d0b90 --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/poker-E.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "poker-E.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/poker-E.imageset/poker-E.png b/poker/poker/poker/Assets.xcassets/poker-E.imageset/poker-E.png new file mode 100644 index 0000000..36fc7cc Binary files /dev/null and b/poker/poker/poker/Assets.xcassets/poker-E.imageset/poker-E.png differ diff --git a/poker/poker/poker/Assets.xcassets/poker-T.imageset/Contents.json b/poker/poker/poker/Assets.xcassets/poker-T.imageset/Contents.json new file mode 100644 index 0000000..af1e30e --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/poker-T.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "poker-T.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/poker-T.imageset/poker-T.png b/poker/poker/poker/Assets.xcassets/poker-T.imageset/poker-T.png new file mode 100644 index 0000000..da0527a Binary files /dev/null and b/poker/poker/poker/Assets.xcassets/poker-T.imageset/poker-T.png differ diff --git a/poker/poker/poker/Assets.xcassets/poker-logo.imageset/Contents.json b/poker/poker/poker/Assets.xcassets/poker-logo.imageset/Contents.json new file mode 100644 index 0000000..3ebab4f --- /dev/null +++ b/poker/poker/poker/Assets.xcassets/poker-logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "poker-logo.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/poker/poker/poker/Assets.xcassets/poker-logo.imageset/poker-logo.png b/poker/poker/poker/Assets.xcassets/poker-logo.imageset/poker-logo.png new file mode 100644 index 0000000..0358de6 Binary files /dev/null and b/poker/poker/poker/Assets.xcassets/poker-logo.imageset/poker-logo.png differ diff --git a/poker/poker/poker/Base.lproj/LaunchScreen.storyboard b/poker/poker/poker/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/poker/poker/poker/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/poker/poker/poker/Base.lproj/Main.storyboard b/poker/poker/poker/Base.lproj/Main.storyboard new file mode 100644 index 0000000..c2cc1b0 --- /dev/null +++ b/poker/poker/poker/Base.lproj/Main.storyboard @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/poker/poker/poker/Carta.swift b/poker/poker/poker/Carta.swift new file mode 100644 index 0000000..d51e10a --- /dev/null +++ b/poker/poker/poker/Carta.swift @@ -0,0 +1,143 @@ +// +// Carta.swift +// poker +// +// Created by Mobile Roshka on 4/13/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import Foundation + +struct Carta{ + var valor = Int() + //var nombre = String() + var palo = Palo.self + //var palo = String() + enum Palo: Int{ + case E = 1 + case T = 2 + case C = 3 + case D = 4 + } + +} + +class Baraja{ + // var enMesa = [String]() + var valor = [Int]() + var valoresOrdenados = [Int]() + var palo = [String]() + var nombreCarta = [String]() + var nombreJugada = "Carta alta" + private let escalera: [Int] = [1, 10, 11, 12, 13] + + //función para extraer 5 cartas y guardar la información en arrays con los valores, el palo y el nombre de la carta en caso de ser A, J, Q y K + func extraerCartas()/*->[String]*/{ + let carta = Carta.init() + + //recorremos un array de 5 elementos (cada una de las cartas extraídas) + for index in 0...4{ + //se elige al azar el palo segun el enum de palo + var paloCarta = carta.palo.init(rawValue: .random(in: 1...4)) + + //se guarda en el array los valores de la carta y el palo + valor.append(Int.random(in: 1...13)) + palo.append("\(paloCarta!)") + + //se recorre por los elementos anteriores para determinar si se repitió la carta y si es así escojemos otra + for i in 0..String{ + + var contSecuencia = 1 + var contPalosIguales = 1 + var diccionarioCantidad: [Int: Int] = [1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0] + diccionarioCantidad[valoresOrdenados[0]]! += 1 + for index in 1...4{ + if valoresOrdenados[index] == valoresOrdenados[index-1]+1{ + contSecuencia += 1 + } + if palo[index] == palo[index-1]{ + contPalosIguales += 1 + } + if diccionarioCantidad[valoresOrdenados[index]] == 0{ + diccionarioCantidad[valoresOrdenados[index]]! += 1 + } + if valoresOrdenados[index] == valoresOrdenados[index - 1]{ + diccionarioCantidad[valoresOrdenados[index]]! += 1 + } + } + if contPalosIguales == 5{ + nombreJugada = "Color" + } + if contSecuencia == 5{ + nombreJugada = "Escalera" + } + if valoresOrdenados == escalera{ + nombreJugada = "Escalera" + } + if nombreJugada == "Escalera" && contPalosIguales == 5 { + nombreJugada = "Escalera Color" + } + let poker = diccionarioCantidad.filter{ $0.value == 4} + let trio = diccionarioCantidad.filter{ $0.value == 3} + let par = diccionarioCantidad.filter{ $0.value == 2} + if par.count == 1{ + nombreJugada = "Par" + } + if par.count == 2{ + nombreJugada = "Par doble" + } + if trio.count == 1{ + nombreJugada = "Trio" + } + if par.count == 1 && trio.count == 1{ + nombreJugada = "Full" + } + if poker.count == 1 { + nombreJugada = "Poker" + } + return nombreJugada + + } + + //eliminamos todas las modificaciones para empezar de nuevo el juego + func barajarCartas(){ + valor.removeAll() + palo.removeAll() + valoresOrdenados.removeAll() + nombreCarta.removeAll() + nombreJugada = "Carta alta" + } + + +} diff --git a/poker/poker/poker/Info.plist b/poker/poker/poker/Info.plist new file mode 100644 index 0000000..2a3483c --- /dev/null +++ b/poker/poker/poker/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/poker/poker/poker/SceneDelegate.swift b/poker/poker/poker/SceneDelegate.swift new file mode 100644 index 0000000..6c2ff91 --- /dev/null +++ b/poker/poker/poker/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// poker +// +// Created by Mobile Roshka on 4/13/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/poker/poker/poker/ViewController.swift b/poker/poker/poker/ViewController.swift new file mode 100644 index 0000000..2b2100d --- /dev/null +++ b/poker/poker/poker/ViewController.swift @@ -0,0 +1,66 @@ +// +// ViewController.swift +// poker +// +// Created by Julio Hermosa on 4/13/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + //var carta:Carta = Carta.init() + var baraja:Baraja = Baraja() + + @IBOutlet weak var resultadoObtenido: UILabel! + + @IBOutlet weak var valorCarta1: UILabel! + @IBOutlet weak var valorCarta2: UILabel! + @IBOutlet weak var valorCarta3: UILabel! + @IBOutlet weak var valorCarta4: UILabel! + @IBOutlet weak var valorCarta5: UILabel! + + @IBOutlet weak var imagenCarta1: UIImageView! + @IBOutlet weak var imagenCarta2: UIImageView! + @IBOutlet weak var imagenCarta3: UIImageView! + @IBOutlet weak var imagenCarta4: UIImageView! + + @IBOutlet weak var imagenCarta5: UIImageView! + + @IBOutlet weak var jugarBtn: UIButton! + + @IBAction func jugarAction(_ sender: Any) { + jugar() + } + + //llamamos a las funciones relativas al juego de la clase baraja (extraer cartas, obtener la jugada y volver a barajar las cartas) + func jugar(){ + baraja.extraerCartas() + resultadoObtenido.text = baraja.jugadas() + + //cargamos los valores del array en los labels de las cartas + valorCarta1.text = baraja.nombreCarta[0] + valorCarta2.text = baraja.nombreCarta[1] + valorCarta3.text = baraja.nombreCarta[2] + valorCarta4.text = baraja.nombreCarta[3] + valorCarta5.text = baraja.nombreCarta[4] + + //segun el nombre de la imagen mostramos su palo + imagenCarta1.image = UIImage(named: "poker-\(baraja.palo[0])") + imagenCarta2.image = UIImage(named: "poker-\(baraja.palo[1])") + imagenCarta3.image = UIImage(named: "poker-\(baraja.palo[2])") + imagenCarta4.image = UIImage(named: "poker-\(baraja.palo[3])") + imagenCarta5.image = UIImage(named: "poker-\(baraja.palo[4])") + + + baraja.barajarCartas() + } + + + override func viewDidLoad() { + super.viewDidLoad() + } + + +} +