From 8b22f48de57df5b4ff17704193d1ec8103b232f1 Mon Sep 17 00:00:00 2001 From: Mobile Roshka Date: Wed, 11 Mar 2020 08:56:46 -0300 Subject: [PATCH] commit terminado --- juego.xcodeproj/project.pbxproj | 605 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juego.xcodeproj/project.xcworkspace/contents.xcworkspacedata | 7 +++++++ juego.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist | 6 ++++++ juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist | 14 ++++++++++++++ juego/AdvancedModeViewController.swift | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juego/AppDelegate.swift | 37 +++++++++++++++++++++++++++++++++++++ juego/Assets.xcassets/AppIcon.appiconset/Contents.json | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juego/Assets.xcassets/Contents.json | 6 ++++++ juego/Base.lproj/LaunchScreen.storyboard | 25 +++++++++++++++++++++++++ juego/Base.lproj/Main.storyboard | 618 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juego/ExpertModeViewController.swift | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juego/FirstView.swift | 47 +++++++++++++++++++++++++++++++++++++++++++++++ juego/HomeViewController.swift | 38 ++++++++++++++++++++++++++++++++++++++ juego/Info.plist | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juego/SceneDelegate.swift | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ juego/SingleModeViewController.swift | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ juegoTests/Info.plist | 22 ++++++++++++++++++++++ juegoTests/juegoTests.swift | 34 ++++++++++++++++++++++++++++++++++ juegoUITests/Info.plist | 22 ++++++++++++++++++++++ juegoUITests/juegoUITests.swift | 43 +++++++++++++++++++++++++++++++++++++++++++ 21 files changed, 2116 insertions(+) create mode 100644 juego.xcodeproj/project.pbxproj create mode 100644 juego.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 juego.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 juego/AdvancedModeViewController.swift create mode 100644 juego/AppDelegate.swift create mode 100644 juego/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 juego/Assets.xcassets/Contents.json create mode 100644 juego/Base.lproj/LaunchScreen.storyboard create mode 100644 juego/Base.lproj/Main.storyboard create mode 100644 juego/ExpertModeViewController.swift create mode 100644 juego/FirstView.swift create mode 100644 juego/HomeViewController.swift create mode 100644 juego/Info.plist create mode 100644 juego/SceneDelegate.swift create mode 100644 juego/SingleModeViewController.swift create mode 100644 juegoTests/Info.plist create mode 100644 juegoTests/juegoTests.swift create mode 100644 juegoUITests/Info.plist create mode 100644 juegoUITests/juegoUITests.swift diff --git a/juego.xcodeproj/project.pbxproj b/juego.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4cfacc3 --- /dev/null +++ b/juego.xcodeproj/project.pbxproj @@ -0,0 +1,605 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + BB08D95124101BCC001B8E22 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D95024101BCC001B8E22 /* AppDelegate.swift */; }; + BB08D95324101BCC001B8E22 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D95224101BCC001B8E22 /* SceneDelegate.swift */; }; + BB08D95824101BCC001B8E22 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB08D95624101BCC001B8E22 /* Main.storyboard */; }; + BB08D95A24101BD0001B8E22 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB08D95924101BD0001B8E22 /* Assets.xcassets */; }; + BB08D95D24101BD0001B8E22 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB08D95B24101BD0001B8E22 /* LaunchScreen.storyboard */; }; + BB08D96824101BD1001B8E22 /* juegoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D96724101BD1001B8E22 /* juegoTests.swift */; }; + BB08D97324101BD1001B8E22 /* juegoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D97224101BD1001B8E22 /* juegoUITests.swift */; }; + BB08D98124101C32001B8E22 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D98024101C32001B8E22 /* HomeViewController.swift */; }; + BB08D98324101CFA001B8E22 /* SingleModeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D98224101CFA001B8E22 /* SingleModeViewController.swift */; }; + BB08D98524101D30001B8E22 /* AdvancedModeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D98424101D30001B8E22 /* AdvancedModeViewController.swift */; }; + BB08D98724101D5C001B8E22 /* ExpertModeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB08D98624101D5C001B8E22 /* ExpertModeViewController.swift */; }; + BBBF41F324111B090056E414 /* FirstView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBF41F224111B090056E414 /* FirstView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + BB08D96424101BD1001B8E22 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BB08D94524101BCC001B8E22 /* Project object */; + proxyType = 1; + remoteGlobalIDString = BB08D94C24101BCC001B8E22; + remoteInfo = juego; + }; + BB08D96F24101BD1001B8E22 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BB08D94524101BCC001B8E22 /* Project object */; + proxyType = 1; + remoteGlobalIDString = BB08D94C24101BCC001B8E22; + remoteInfo = juego; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + BB08D94D24101BCC001B8E22 /* juego.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = juego.app; sourceTree = BUILT_PRODUCTS_DIR; }; + BB08D95024101BCC001B8E22 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + BB08D95224101BCC001B8E22 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + BB08D95724101BCC001B8E22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + BB08D95924101BD0001B8E22 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + BB08D95C24101BD0001B8E22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + BB08D95E24101BD0001B8E22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BB08D96324101BD1001B8E22 /* juegoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = juegoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + BB08D96724101BD1001B8E22 /* juegoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = juegoTests.swift; sourceTree = ""; }; + BB08D96924101BD1001B8E22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BB08D96E24101BD1001B8E22 /* juegoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = juegoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + BB08D97224101BD1001B8E22 /* juegoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = juegoUITests.swift; sourceTree = ""; }; + BB08D97424101BD1001B8E22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BB08D98024101C32001B8E22 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; + BB08D98224101CFA001B8E22 /* SingleModeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleModeViewController.swift; sourceTree = ""; }; + BB08D98424101D30001B8E22 /* AdvancedModeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedModeViewController.swift; sourceTree = ""; }; + BB08D98624101D5C001B8E22 /* ExpertModeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpertModeViewController.swift; sourceTree = ""; }; + BBBF41F224111B090056E414 /* FirstView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BB08D94A24101BCC001B8E22 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BB08D96024101BD1001B8E22 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BB08D96B24101BD1001B8E22 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + BB08D94424101BCC001B8E22 = { + isa = PBXGroup; + children = ( + BB08D94F24101BCC001B8E22 /* juego */, + BB08D96624101BD1001B8E22 /* juegoTests */, + BB08D97124101BD1001B8E22 /* juegoUITests */, + BB08D94E24101BCC001B8E22 /* Products */, + ); + sourceTree = ""; + }; + BB08D94E24101BCC001B8E22 /* Products */ = { + isa = PBXGroup; + children = ( + BB08D94D24101BCC001B8E22 /* juego.app */, + BB08D96324101BD1001B8E22 /* juegoTests.xctest */, + BB08D96E24101BD1001B8E22 /* juegoUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + BB08D94F24101BCC001B8E22 /* juego */ = { + isa = PBXGroup; + children = ( + BB08D95024101BCC001B8E22 /* AppDelegate.swift */, + BB08D95224101BCC001B8E22 /* SceneDelegate.swift */, + BB08D98024101C32001B8E22 /* HomeViewController.swift */, + BB08D95624101BCC001B8E22 /* Main.storyboard */, + BB08D95924101BD0001B8E22 /* Assets.xcassets */, + BB08D95B24101BD0001B8E22 /* LaunchScreen.storyboard */, + BB08D95E24101BD0001B8E22 /* Info.plist */, + BB08D98224101CFA001B8E22 /* SingleModeViewController.swift */, + BB08D98424101D30001B8E22 /* AdvancedModeViewController.swift */, + BB08D98624101D5C001B8E22 /* ExpertModeViewController.swift */, + BBBF41F224111B090056E414 /* FirstView.swift */, + ); + path = juego; + sourceTree = ""; + }; + BB08D96624101BD1001B8E22 /* juegoTests */ = { + isa = PBXGroup; + children = ( + BB08D96724101BD1001B8E22 /* juegoTests.swift */, + BB08D96924101BD1001B8E22 /* Info.plist */, + ); + path = juegoTests; + sourceTree = ""; + }; + BB08D97124101BD1001B8E22 /* juegoUITests */ = { + isa = PBXGroup; + children = ( + BB08D97224101BD1001B8E22 /* juegoUITests.swift */, + BB08D97424101BD1001B8E22 /* Info.plist */, + ); + path = juegoUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + BB08D94C24101BCC001B8E22 /* juego */ = { + isa = PBXNativeTarget; + buildConfigurationList = BB08D97724101BD1001B8E22 /* Build configuration list for PBXNativeTarget "juego" */; + buildPhases = ( + BB08D94924101BCC001B8E22 /* Sources */, + BB08D94A24101BCC001B8E22 /* Frameworks */, + BB08D94B24101BCC001B8E22 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = juego; + productName = juego; + productReference = BB08D94D24101BCC001B8E22 /* juego.app */; + productType = "com.apple.product-type.application"; + }; + BB08D96224101BD1001B8E22 /* juegoTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = BB08D97A24101BD1001B8E22 /* Build configuration list for PBXNativeTarget "juegoTests" */; + buildPhases = ( + BB08D95F24101BD1001B8E22 /* Sources */, + BB08D96024101BD1001B8E22 /* Frameworks */, + BB08D96124101BD1001B8E22 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + BB08D96524101BD1001B8E22 /* PBXTargetDependency */, + ); + name = juegoTests; + productName = juegoTests; + productReference = BB08D96324101BD1001B8E22 /* juegoTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + BB08D96D24101BD1001B8E22 /* juegoUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = BB08D97D24101BD1001B8E22 /* Build configuration list for PBXNativeTarget "juegoUITests" */; + buildPhases = ( + BB08D96A24101BD1001B8E22 /* Sources */, + BB08D96B24101BD1001B8E22 /* Frameworks */, + BB08D96C24101BD1001B8E22 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + BB08D97024101BD1001B8E22 /* PBXTargetDependency */, + ); + name = juegoUITests; + productName = juegoUITests; + productReference = BB08D96E24101BD1001B8E22 /* juegoUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BB08D94524101BCC001B8E22 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1110; + LastUpgradeCheck = 1110; + ORGANIZATIONNAME = "Mobile Roshka"; + TargetAttributes = { + BB08D94C24101BCC001B8E22 = { + CreatedOnToolsVersion = 11.1; + }; + BB08D96224101BD1001B8E22 = { + CreatedOnToolsVersion = 11.1; + TestTargetID = BB08D94C24101BCC001B8E22; + }; + BB08D96D24101BD1001B8E22 = { + CreatedOnToolsVersion = 11.1; + TestTargetID = BB08D94C24101BCC001B8E22; + }; + }; + }; + buildConfigurationList = BB08D94824101BCC001B8E22 /* Build configuration list for PBXProject "juego" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = BB08D94424101BCC001B8E22; + productRefGroup = BB08D94E24101BCC001B8E22 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BB08D94C24101BCC001B8E22 /* juego */, + BB08D96224101BD1001B8E22 /* juegoTests */, + BB08D96D24101BD1001B8E22 /* juegoUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BB08D94B24101BCC001B8E22 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB08D95D24101BD0001B8E22 /* LaunchScreen.storyboard in Resources */, + BB08D95A24101BD0001B8E22 /* Assets.xcassets in Resources */, + BB08D95824101BCC001B8E22 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BB08D96124101BD1001B8E22 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BB08D96C24101BD1001B8E22 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + BB08D94924101BCC001B8E22 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB08D95124101BCC001B8E22 /* AppDelegate.swift in Sources */, + BB08D98124101C32001B8E22 /* HomeViewController.swift in Sources */, + BB08D98724101D5C001B8E22 /* ExpertModeViewController.swift in Sources */, + BB08D98524101D30001B8E22 /* AdvancedModeViewController.swift in Sources */, + BB08D98324101CFA001B8E22 /* SingleModeViewController.swift in Sources */, + BB08D95324101BCC001B8E22 /* SceneDelegate.swift in Sources */, + BBBF41F324111B090056E414 /* FirstView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BB08D95F24101BD1001B8E22 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB08D96824101BD1001B8E22 /* juegoTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BB08D96A24101BD1001B8E22 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB08D97324101BD1001B8E22 /* juegoUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + BB08D96524101BD1001B8E22 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BB08D94C24101BCC001B8E22 /* juego */; + targetProxy = BB08D96424101BD1001B8E22 /* PBXContainerItemProxy */; + }; + BB08D97024101BD1001B8E22 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BB08D94C24101BCC001B8E22 /* juego */; + targetProxy = BB08D96F24101BD1001B8E22 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + BB08D95624101BCC001B8E22 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BB08D95724101BCC001B8E22 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + BB08D95B24101BD0001B8E22 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BB08D95C24101BD0001B8E22 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + BB08D97524101BD1001B8E22 /* 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; + }; + BB08D97624101BD1001B8E22 /* 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; + }; + BB08D97824101BD1001B8E22 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = juego/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.juego; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + BB08D97924101BD1001B8E22 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = juego/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.juego; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + BB08D97B24101BD1001B8E22 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = juegoTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.juegoTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/juego.app/juego"; + }; + name = Debug; + }; + BB08D97C24101BD1001B8E22 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = juegoTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.juegoTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/juego.app/juego"; + }; + name = Release; + }; + BB08D97E24101BD1001B8E22 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = juegoUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.juegoUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = juego; + }; + name = Debug; + }; + BB08D97F24101BD1001B8E22 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = juegoUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = roshka.juegoUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = juego; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BB08D94824101BCC001B8E22 /* Build configuration list for PBXProject "juego" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BB08D97524101BD1001B8E22 /* Debug */, + BB08D97624101BD1001B8E22 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BB08D97724101BD1001B8E22 /* Build configuration list for PBXNativeTarget "juego" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BB08D97824101BD1001B8E22 /* Debug */, + BB08D97924101BD1001B8E22 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BB08D97A24101BD1001B8E22 /* Build configuration list for PBXNativeTarget "juegoTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BB08D97B24101BD1001B8E22 /* Debug */, + BB08D97C24101BD1001B8E22 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BB08D97D24101BD1001B8E22 /* Build configuration list for PBXNativeTarget "juegoUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BB08D97E24101BD1001B8E22 /* Debug */, + BB08D97F24101BD1001B8E22 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BB08D94524101BCC001B8E22 /* Project object */; +} diff --git a/juego.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/juego.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..56f2404 --- /dev/null +++ b/juego.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/juego.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/juego.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/juego.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..f5f22de --- /dev/null +++ b/juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist b/juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..b68ca23 --- /dev/null +++ b/juego.xcodeproj/xcuserdata/roshka.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + juego.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/juego/AdvancedModeViewController.swift b/juego/AdvancedModeViewController.swift new file mode 100644 index 0000000..7e90042 --- /dev/null +++ b/juego/AdvancedModeViewController.swift @@ -0,0 +1,153 @@ +// +// advancedMode.swift +// juego +// +// Created by Mobile Roshka on 3/4/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import UIKit + +class AdvancedModeViewController: UIViewController { + /*Se inicializan los valores a ser utilizados, puntaje, si el juego esta en curso, si el tiempo esta en curso, temporizador, contador de intentos y posicion del boton + */ + var points = 0 + var initGame = false + var initTimer = false + var timer = Timer() + var timeRest = 0 + var countGames = 0 + + let screenSize :CGRect = UIScreen.main.bounds + let screenWidth = UIScreen.main.bounds.width + let screenHeight = UIScreen.main.bounds.height + var x = 0 + var y = 0 + var buttonWidth = 86 + var buttonHeight = 86 + + + + //el puntaje actual del jugador + @IBOutlet weak var pointsLblAM: UILabel! + + //el tiempo restante + @IBOutlet weak var timeRestAMLbl: UILabel! + + //texto y propiedades del boton jugar (se opaca cuando inicia el juego) + @IBOutlet weak var playGameAMOutlet: UIButton! + + + @IBOutlet weak var viewOutlet: UIView! + + + @IBAction func instructions(_ sender: Any) { + showAlertIntructions(message: "Presiona el boton azul la mayor cantidad de veces posibles antes de que se acabe el tiempo ") + + } + @IBAction func bestPlayerBtn(_ sender: Any) { + showAlertBestPoint(message: "Mejor puntaje: \nObtenido por") + } + + @IBOutlet weak var touchBtnOutlet: UIButton! + + + //eventos relacionados al inicio del juego + @IBAction func playGameAM(_ sender: Any) { + /*Inicia el juego cuendo se presiona el boton, */ + points = 0 + initGame = true + initTimer = true + timeRest = 30 + timeRestAMLbl.text = "\(timeRest)" + playGameAMOutlet.alpha = 0.5 + + + if initTimer{ + points = 0 + timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(timeRestMethod), userInfo :nil, repeats: true) + } + + + } + //Método para ir decrementando el tiempo y eventos correspondientes + @objc func timeRestMethod() + { + timeRest -= 1 + timeRestAMLbl.text = "\(timeRest)" + + //condicion de parada del temporizador y enventos al terminar el juego + if timeRest == 0 { + timer.invalidate() + initGame = false + countGames += 1 + showAlertGameOver(message: "Intento \(countGames) \nHas logrado \(points) puntos") + playGameAMOutlet.alpha = 1 + pointsLblAM.text = "0" + resetButton() + + } + } + + //contador de puntos segun cantidad de clicks + @IBAction func touchPlayBtnAM(_ sender: Any) { + if buttonHeight < 30 { + + timer.invalidate() + showAlertGameOver(message: "Intento \(countGames) \nHas ganado en \(30 - timeRest) segundos") + playGameAMOutlet.alpha = 1 + resetButton() + + + } + if initGame{ + x = Int.random(in: 53..<(Int(screenWidth)-53) + ) + y = Int.random(in: 100..<(Int(screenHeight)/2)) + + + touchBtnOutlet.center.x = CGFloat(x) + touchBtnOutlet.center.y = CGFloat(y) + buttonWidth -= 6 + buttonHeight -= 6 + + touchBtnOutlet.frame.size = CGSize(width: CGFloat(buttonWidth), height: CGFloat(buttonHeight)) + + points += 1 + pointsLblAM.text = "\(points)" + } + + } + + //alerta cuando termina el juego, aparece el numero actual de intentos y el puntaje obtenido + private func showAlertGameOver(message: String){ + let alertGameOver = UIAlertController(title: "Juego Terminado", message:message, preferredStyle: .alert) + alertGameOver.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alertGameOver, animated:true, completion:nil) + } + private func showAlertIntructions(message: String){ + let alert = UIAlertController(title: "Instrucciones", message:message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alert, animated:true, completion:nil) + } + private func showAlertBestPoint(message: String){ + let alert = UIAlertController(title: "Mejor Puntaje", message:message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alert, animated:true, completion:nil) + } + private func resetButton(){ + touchBtnOutlet.center.x = screenWidth/2 + touchBtnOutlet.center.y = screenHeight/2 + + buttonWidth = 86 + buttonHeight = 86 + touchBtnOutlet.frame.size = CGSize(width: CGFloat(buttonWidth), height: CGFloat(buttonHeight)) + } + + + override func viewDidLoad() { + super.viewDidLoad() + resetButton() + } + +} diff --git a/juego/AppDelegate.swift b/juego/AppDelegate.swift new file mode 100644 index 0000000..b5ce27a --- /dev/null +++ b/juego/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// juego +// +// Created by Mobile Roshka on 3/4/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/juego/Assets.xcassets/AppIcon.appiconset/Contents.json b/juego/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/juego/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/juego/Assets.xcassets/Contents.json b/juego/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/juego/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/juego/Base.lproj/LaunchScreen.storyboard b/juego/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/juego/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/juego/Base.lproj/Main.storyboard b/juego/Base.lproj/Main.storyboard new file mode 100644 index 0000000..17de7d8 --- /dev/null +++ b/juego/Base.lproj/Main.storyboard @@ -0,0 +1,618 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/juego/ExpertModeViewController.swift b/juego/ExpertModeViewController.swift new file mode 100644 index 0000000..9a4a8e6 --- /dev/null +++ b/juego/ExpertModeViewController.swift @@ -0,0 +1,144 @@ +// +// expertMode.swift +// juego +// +// Created by Mobile Roshka on 3/4/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// +import UIKit + +class ExpertModeViewController: UIViewController { + /*Se inicializan los valores a ser utilizados, puntaje, si el juego esta en curso, si el tiempo esta en curso, temporizador, contador de intentos y posicion del boton + */ + var touchs = 0 + var initGame = false + var initTimer = false + var timer = Timer() + var timeRest = 0 + var countGames = 0 + /*se obtiene el largo y ancho de pantalla*/ + let screenSize :CGRect = UIScreen.main.bounds + let screenWidth = UIScreen.main.bounds.width + let screenHeight = UIScreen.main.bounds.height + /*se inicializa las variables de posicion para el boton*/ + var x = 0 + var y = 0 + /*Largo y ancho del boton*/ + var buttonWidth = 86 + var buttonHeight = 86 + + + //toques restantes para ganar + @IBOutlet weak var touchsLblEM: UILabel! + //el tiempo restante + @IBOutlet weak var timeRestEMLbl: UILabel! + //texto y propiedades del boton jugar (se opaca cuando inicia el juego) + @IBOutlet weak var playGameEMOutlet: UIButton! + + @IBAction func instructionsEM(_ sender: Any) { + showAlertIntructions(message: "Reduce el tamaño del boton al mínimo posible antes de que se acabe el tiempo ") + + } + @IBAction func bestPlayerBtnEM(_ sender: Any) { showAlertBestPoint(message: "Mejor puntaje: \nObtenido por") + } + + @IBOutlet weak var touchBtnOutlet: UIButton! + + //eventos relacionados al inicio del juego + @IBAction func playGameEM(_ sender: Any) { /*Inicia el juego cuendo se presiona el boton, */ + initGame = true + initTimer = true + timeRest = 30 + timeRestEMLbl.text = "\(timeRest)" + playGameEMOutlet.alpha = 0.5 + + + if initTimer{ + touchs = 10 + timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(timeRestMethod), userInfo :nil, repeats: true) + } + + + } + //Método para ir decrementando el tiempo y eventos correspondientes + @objc func timeRestMethod() + { + timeRest -= 1 + timeRestEMLbl.text = "\(timeRest)" + + //condicion de parada del temporizador y enventos al terminar el juego + if timeRest == 0 { + timer.invalidate() + initGame = false + countGames += 1 + showAlertGameOver(message: "Intento \(countGames) \nPerdiste \n te faltaron \(touchs) toques") + + resetGame() + + } + } + + //eventos relacionados a cuando se presiona el botón + @IBAction func touchPlayBtnAM(_ sender: Any) { + if touchs == 1 { + timer.invalidate() + showAlertGameOver(message: "Intento \(countGames) \nHas ganado en \(30 - timeRest) segundos") + playGameEMOutlet.alpha = 1 + resetGame() + + + } + if initGame{ + x = Int.random(in: 103..<(Int(screenWidth)-53) + ) + y = Int.random(in: 100..<(Int(screenHeight)/2)) + + + touchBtnOutlet.center.x = CGFloat(x) + touchBtnOutlet.center.y = CGFloat(y) + buttonWidth -= 6 + buttonHeight -= 6 + + touchBtnOutlet.frame.size = CGSize(width: CGFloat(buttonWidth), height: CGFloat(buttonHeight)) + + touchs -= 1 + touchsLblEM.text = "\(touchs)" + } + + } + + //alerta cuando termina el juego, aparece el numero actual de intentos y el puntaje obtenido + private func showAlertGameOver(message: String){ + let alertGameOver = UIAlertController(title: "Juego Terminado", message:message, preferredStyle: .alert) + alertGameOver.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alertGameOver, animated:true, completion:nil) + } + private func showAlertIntructions(message: String){ + let alert = UIAlertController(title: "Instrucciones", message:message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alert, animated:true, completion:nil) + } + private func showAlertBestPoint(message: String){ + let alert = UIAlertController(title: "Mejor Puntaje", message:message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alert, animated:true, completion:nil) + } + private func resetGame(){ + touchBtnOutlet.center.x = screenWidth/2 + touchBtnOutlet.center.y = screenHeight/2 + touchs = 0 + + buttonWidth = 86 + buttonHeight = 86 + touchBtnOutlet.frame.size = CGSize(width: CGFloat(buttonWidth), height: CGFloat(buttonHeight)) + playGameEMOutlet.alpha = 1 + touchsLblEM.text = "0" + } + + + override func viewDidLoad() { + super.viewDidLoad() + resetGame() + } + +} diff --git a/juego/FirstView.swift b/juego/FirstView.swift new file mode 100644 index 0000000..d27bf85 --- /dev/null +++ b/juego/FirstView.swift @@ -0,0 +1,47 @@ +// +// firstView.swift +// juego +// +// Created by Mobile Roshka on 3/5/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// +import Foundation +import UIKit + +class FirstViewController: UIViewController { + var playerName = "" + + @IBAction func nameTextField(_ sender: Any) { + + + } + + @IBOutlet weak var nameTextFieldInput: UITextField! + + @IBAction func saveBtn(_ sender: Any) { + if let pName = nameTextFieldInput.text{ + playerName = pName + showAlert(message: "\(playerName) registrado correctamente") + + } + else { + showAlert(message: "No se ha registrado ningun jugador") + } + } + + private func showAlert(message: String){ + let alert = UIAlertController(title: "Registrar Jugador", message:message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil)) + present(alert, animated:true, completion:nil) + } + override func viewDidLoad() { + super.viewDidLoad() + + } + + @IBAction func enterBtn(_ sender: Any) { + let hVC = self.storyboard?.instantiateViewController(withIdentifier: "homeVC") as! HomeViewControler + hVC.name = playerName + } + +} diff --git a/juego/HomeViewController.swift b/juego/HomeViewController.swift new file mode 100644 index 0000000..95c3baa --- /dev/null +++ b/juego/HomeViewController.swift @@ -0,0 +1,38 @@ +// +// home.swift +// juego +// +// Created by Mobile Roshka on 3/4/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import UIKit + +class HomeViewControler: UIViewController { + var name: String? + + @IBOutlet weak var playerNameLbl: UILabel! + + + //botones de ingreso a los juegos + @IBOutlet weak var singleModeBtn: UIButton! + @IBOutlet weak var advancedModeBtn: UIButton! + @IBOutlet weak var expertModeBtn: UIButton! + + + override func viewDidLoad() { + super.viewDidLoad() + if let pName = name { + playerNameLbl.text = "Bienvenido, \(pName)" + } + else { + playerNameLbl.text = "Bienvenido, Invitado" + + } + + + + } + + +} diff --git a/juego/Info.plist b/juego/Info.plist new file mode 100644 index 0000000..2a3483c --- /dev/null +++ b/juego/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/juego/SceneDelegate.swift b/juego/SceneDelegate.swift new file mode 100644 index 0000000..6203af0 --- /dev/null +++ b/juego/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// juego +// +// Created by Mobile Roshka on 3/4/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/juego/SingleModeViewController.swift b/juego/SingleModeViewController.swift new file mode 100644 index 0000000..49c3695 --- /dev/null +++ b/juego/SingleModeViewController.swift @@ -0,0 +1,72 @@ +// +// singleMode.swift +// juego +// +// Created by Mobile Roshka on 3/4/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import UIKit + +class SingleModeViewController: UIViewController { + var points = 0 + var initGame = false + var initTimer = false + var timer = Timer() + var timeRest = 10 + + + + + @IBOutlet weak var pointsLbl: UILabel! + @IBOutlet weak var timeRestLbl: UILabel! + + + + @IBAction func playGame(_ sender: Any) { + initGame = true + initTimer = true + timeRest = 10 + timeRestLbl.text = "\(timeRest)" + if initTimer{ + timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(timeRestMethod), userInfo :nil, repeats: true) + } + + + } + + @objc func timeRestMethod() + { + + timeRest -= 1 + timeRestLbl.text = "\(timeRest)" + if timeRest == 0 { + timer.invalidate() + initGame = false + } + + } + @IBAction func touchBtn(_ sender: Any) { + + + + if initGame{ + points += 1 + pointsLbl.text = "\(points)" + + } + + + } + + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + + +} diff --git a/juegoTests/Info.plist b/juegoTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/juegoTests/Info.plist @@ -0,0 +1,22 @@ + + + + + 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 + + diff --git a/juegoTests/juegoTests.swift b/juegoTests/juegoTests.swift new file mode 100644 index 0000000..747283c --- /dev/null +++ b/juegoTests/juegoTests.swift @@ -0,0 +1,34 @@ +// +// juegoTests.swift +// juegoTests +// +// Created by Mobile Roshka on 3/4/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import XCTest +@testable import juego + +class juegoTests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/juegoUITests/Info.plist b/juegoUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/juegoUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + 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 + + diff --git a/juegoUITests/juegoUITests.swift b/juegoUITests/juegoUITests.swift new file mode 100644 index 0000000..c4afcec --- /dev/null +++ b/juegoUITests/juegoUITests.swift @@ -0,0 +1,43 @@ +// +// juegoUITests.swift +// juegoUITests +// +// Created by Mobile Roshka on 3/4/20. +// Copyright © 2020 Mobile Roshka. All rights reserved. +// + +import XCTest + +class juegoUITests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { + XCUIApplication().launch() + } + } + } +} -- libgit2 0.26.0