diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/project.pbxproj b/DevourAndDrought/DevourAndDrought.xcodeproj/project.pbxproj new file mode 100644 index 0000000..53a1765 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought.xcodeproj/project.pbxproj @@ -0,0 +1,643 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + BD805B872720AD2E0070B153 /* SetupControllers.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD805B862720AD2E0070B153 /* SetupControllers.swift */; }; + BD8AAC44271D1FA5005F159B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8AAC43271D1FA5005F159B /* AppDelegate.swift */; }; + BD8AAC46271D1FA5005F159B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8AAC45271D1FA5005F159B /* SceneDelegate.swift */; }; + BD8AAC48271D1FA5005F159B /* GameControllers.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8AAC47271D1FA5005F159B /* GameControllers.swift */; }; + BD8AAC4B271D1FA5005F159B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD8AAC49271D1FA5005F159B /* Main.storyboard */; }; + BD8AAC4D271D1FAB005F159B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD8AAC4C271D1FAB005F159B /* Assets.xcassets */; }; + BD8AAC50271D1FAB005F159B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD8AAC4E271D1FAB005F159B /* LaunchScreen.storyboard */; }; + BD8AAC5B271D1FAC005F159B /* DevourAndDroughtTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8AAC5A271D1FAC005F159B /* DevourAndDroughtTests.swift */; }; + BD8AAC65271D1FAC005F159B /* DevourAndDroughtUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8AAC64271D1FAC005F159B /* DevourAndDroughtUITests.swift */; }; + BD8AAC67271D1FAC005F159B /* DevourAndDroughtUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8AAC66271D1FAC005F159B /* DevourAndDroughtUITestsLaunchTests.swift */; }; + BDF824EC27206BBD0023067C /* SupportingClasses.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF824EB27206BBD0023067C /* SupportingClasses.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + BD8AAC57271D1FAC005F159B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BD8AAC38271D1FA5005F159B /* Project object */; + proxyType = 1; + remoteGlobalIDString = BD8AAC3F271D1FA5005F159B; + remoteInfo = DevourAndDrought; + }; + BD8AAC61271D1FAC005F159B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BD8AAC38271D1FA5005F159B /* Project object */; + proxyType = 1; + remoteGlobalIDString = BD8AAC3F271D1FA5005F159B; + remoteInfo = DevourAndDrought; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + BD805B862720AD2E0070B153 /* SetupControllers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetupControllers.swift; sourceTree = ""; }; + BD8AAC40271D1FA5005F159B /* DevourAndDrought.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DevourAndDrought.app; sourceTree = BUILT_PRODUCTS_DIR; }; + BD8AAC43271D1FA5005F159B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + BD8AAC45271D1FA5005F159B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + BD8AAC47271D1FA5005F159B /* GameControllers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameControllers.swift; sourceTree = ""; }; + BD8AAC4A271D1FA5005F159B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + BD8AAC4C271D1FAB005F159B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + BD8AAC4F271D1FAB005F159B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + BD8AAC51271D1FAB005F159B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BD8AAC56271D1FAC005F159B /* DevourAndDroughtTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DevourAndDroughtTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + BD8AAC5A271D1FAC005F159B /* DevourAndDroughtTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DevourAndDroughtTests.swift; sourceTree = ""; }; + BD8AAC60271D1FAC005F159B /* DevourAndDroughtUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DevourAndDroughtUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + BD8AAC64271D1FAC005F159B /* DevourAndDroughtUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DevourAndDroughtUITests.swift; sourceTree = ""; }; + BD8AAC66271D1FAC005F159B /* DevourAndDroughtUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DevourAndDroughtUITestsLaunchTests.swift; sourceTree = ""; }; + BDF824EB27206BBD0023067C /* SupportingClasses.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportingClasses.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BD8AAC3D271D1FA5005F159B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD8AAC53271D1FAC005F159B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD8AAC5D271D1FAC005F159B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + BD8AAC37271D1FA5005F159B = { + isa = PBXGroup; + children = ( + BD8AAC42271D1FA5005F159B /* DevourAndDrought */, + BD8AAC59271D1FAC005F159B /* DevourAndDroughtTests */, + BD8AAC63271D1FAC005F159B /* DevourAndDroughtUITests */, + BD8AAC41271D1FA5005F159B /* Products */, + ); + sourceTree = ""; + }; + BD8AAC41271D1FA5005F159B /* Products */ = { + isa = PBXGroup; + children = ( + BD8AAC40271D1FA5005F159B /* DevourAndDrought.app */, + BD8AAC56271D1FAC005F159B /* DevourAndDroughtTests.xctest */, + BD8AAC60271D1FAC005F159B /* DevourAndDroughtUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + BD8AAC42271D1FA5005F159B /* DevourAndDrought */ = { + isa = PBXGroup; + children = ( + BD8AAC43271D1FA5005F159B /* AppDelegate.swift */, + BD8AAC45271D1FA5005F159B /* SceneDelegate.swift */, + BD8AAC47271D1FA5005F159B /* GameControllers.swift */, + BD805B862720AD2E0070B153 /* SetupControllers.swift */, + BDF824EB27206BBD0023067C /* SupportingClasses.swift */, + BD8AAC49271D1FA5005F159B /* Main.storyboard */, + BD8AAC4C271D1FAB005F159B /* Assets.xcassets */, + BD8AAC4E271D1FAB005F159B /* LaunchScreen.storyboard */, + BD8AAC51271D1FAB005F159B /* Info.plist */, + ); + path = DevourAndDrought; + sourceTree = ""; + }; + BD8AAC59271D1FAC005F159B /* DevourAndDroughtTests */ = { + isa = PBXGroup; + children = ( + BD8AAC5A271D1FAC005F159B /* DevourAndDroughtTests.swift */, + ); + path = DevourAndDroughtTests; + sourceTree = ""; + }; + BD8AAC63271D1FAC005F159B /* DevourAndDroughtUITests */ = { + isa = PBXGroup; + children = ( + BD8AAC64271D1FAC005F159B /* DevourAndDroughtUITests.swift */, + BD8AAC66271D1FAC005F159B /* DevourAndDroughtUITestsLaunchTests.swift */, + ); + path = DevourAndDroughtUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + BD8AAC3F271D1FA5005F159B /* DevourAndDrought */ = { + isa = PBXNativeTarget; + buildConfigurationList = BD8AAC6A271D1FAC005F159B /* Build configuration list for PBXNativeTarget "DevourAndDrought" */; + buildPhases = ( + BD8AAC3C271D1FA5005F159B /* Sources */, + BD8AAC3D271D1FA5005F159B /* Frameworks */, + BD8AAC3E271D1FA5005F159B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DevourAndDrought; + productName = DevourAndDrought; + productReference = BD8AAC40271D1FA5005F159B /* DevourAndDrought.app */; + productType = "com.apple.product-type.application"; + }; + BD8AAC55271D1FAC005F159B /* DevourAndDroughtTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = BD8AAC6D271D1FAC005F159B /* Build configuration list for PBXNativeTarget "DevourAndDroughtTests" */; + buildPhases = ( + BD8AAC52271D1FAC005F159B /* Sources */, + BD8AAC53271D1FAC005F159B /* Frameworks */, + BD8AAC54271D1FAC005F159B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + BD8AAC58271D1FAC005F159B /* PBXTargetDependency */, + ); + name = DevourAndDroughtTests; + productName = DevourAndDroughtTests; + productReference = BD8AAC56271D1FAC005F159B /* DevourAndDroughtTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + BD8AAC5F271D1FAC005F159B /* DevourAndDroughtUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = BD8AAC70271D1FAC005F159B /* Build configuration list for PBXNativeTarget "DevourAndDroughtUITests" */; + buildPhases = ( + BD8AAC5C271D1FAC005F159B /* Sources */, + BD8AAC5D271D1FAC005F159B /* Frameworks */, + BD8AAC5E271D1FAC005F159B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + BD8AAC62271D1FAC005F159B /* PBXTargetDependency */, + ); + name = DevourAndDroughtUITests; + productName = DevourAndDroughtUITests; + productReference = BD8AAC60271D1FAC005F159B /* DevourAndDroughtUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BD8AAC38271D1FA5005F159B /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1300; + LastUpgradeCheck = 1300; + TargetAttributes = { + BD8AAC3F271D1FA5005F159B = { + CreatedOnToolsVersion = 13.0; + }; + BD8AAC55271D1FAC005F159B = { + CreatedOnToolsVersion = 13.0; + TestTargetID = BD8AAC3F271D1FA5005F159B; + }; + BD8AAC5F271D1FAC005F159B = { + CreatedOnToolsVersion = 13.0; + TestTargetID = BD8AAC3F271D1FA5005F159B; + }; + }; + }; + buildConfigurationList = BD8AAC3B271D1FA5005F159B /* Build configuration list for PBXProject "DevourAndDrought" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = BD8AAC37271D1FA5005F159B; + productRefGroup = BD8AAC41271D1FA5005F159B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BD8AAC3F271D1FA5005F159B /* DevourAndDrought */, + BD8AAC55271D1FAC005F159B /* DevourAndDroughtTests */, + BD8AAC5F271D1FAC005F159B /* DevourAndDroughtUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BD8AAC3E271D1FA5005F159B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BD8AAC50271D1FAB005F159B /* LaunchScreen.storyboard in Resources */, + BD8AAC4D271D1FAB005F159B /* Assets.xcassets in Resources */, + BD8AAC4B271D1FA5005F159B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD8AAC54271D1FAC005F159B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD8AAC5E271D1FAC005F159B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + BD8AAC3C271D1FA5005F159B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BD805B872720AD2E0070B153 /* SetupControllers.swift in Sources */, + BD8AAC48271D1FA5005F159B /* GameControllers.swift in Sources */, + BD8AAC44271D1FA5005F159B /* AppDelegate.swift in Sources */, + BD8AAC46271D1FA5005F159B /* SceneDelegate.swift in Sources */, + BDF824EC27206BBD0023067C /* SupportingClasses.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD8AAC52271D1FAC005F159B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BD8AAC5B271D1FAC005F159B /* DevourAndDroughtTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD8AAC5C271D1FAC005F159B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BD8AAC65271D1FAC005F159B /* DevourAndDroughtUITests.swift in Sources */, + BD8AAC67271D1FAC005F159B /* DevourAndDroughtUITestsLaunchTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + BD8AAC58271D1FAC005F159B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BD8AAC3F271D1FA5005F159B /* DevourAndDrought */; + targetProxy = BD8AAC57271D1FAC005F159B /* PBXContainerItemProxy */; + }; + BD8AAC62271D1FAC005F159B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BD8AAC3F271D1FA5005F159B /* DevourAndDrought */; + targetProxy = BD8AAC61271D1FAC005F159B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + BD8AAC49271D1FA5005F159B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BD8AAC4A271D1FA5005F159B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + BD8AAC4E271D1FAB005F159B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BD8AAC4F271D1FAB005F159B /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + BD8AAC68271D1FAC005F159B /* 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++17"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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 = 15.0; + 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; + }; + BD8AAC69271D1FAC005F159B /* 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++17"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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 = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + BD8AAC6B271D1FAC005F159B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = PRBH2T6668; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = DevourAndDrought/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = Devour; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationPortrait"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.faf; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + BD8AAC6C271D1FAC005F159B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = PRBH2T6668; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = DevourAndDrought/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = Devour; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationPortrait"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.faf; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + BD8AAC6E271D1FAC005F159B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = PRBH2T6668; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.DevourAndDroughtTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DevourAndDrought.app/DevourAndDrought"; + }; + name = Debug; + }; + BD8AAC6F271D1FAC005F159B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = PRBH2T6668; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.DevourAndDroughtTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DevourAndDrought.app/DevourAndDrought"; + }; + name = Release; + }; + BD8AAC71271D1FAC005F159B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = PRBH2T6668; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.DevourAndDroughtUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DevourAndDrought; + }; + name = Debug; + }; + BD8AAC72271D1FAC005F159B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = PRBH2T6668; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.DevourAndDroughtUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DevourAndDrought; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BD8AAC3B271D1FA5005F159B /* Build configuration list for PBXProject "DevourAndDrought" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BD8AAC68271D1FAC005F159B /* Debug */, + BD8AAC69271D1FAC005F159B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BD8AAC6A271D1FAC005F159B /* Build configuration list for PBXNativeTarget "DevourAndDrought" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BD8AAC6B271D1FAC005F159B /* Debug */, + BD8AAC6C271D1FAC005F159B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BD8AAC6D271D1FAC005F159B /* Build configuration list for PBXNativeTarget "DevourAndDroughtTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BD8AAC6E271D1FAC005F159B /* Debug */, + BD8AAC6F271D1FAC005F159B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BD8AAC70271D1FAC005F159B /* Build configuration list for PBXNativeTarget "DevourAndDroughtUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BD8AAC71271D1FAC005F159B /* Debug */, + BD8AAC72271D1FAC005F159B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BD8AAC38271D1FA5005F159B /* Project object */; +} diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..908998a Binary files /dev/null and b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcuserdata/penelopegomez.xcuserdatad/UserInterfaceState.xcuserstate b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcuserdata/penelopegomez.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..4421801 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought.xcodeproj/project.xcworkspace/xcuserdata/penelopegomez.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/xcuserdata/micahgomez.xcuserdatad/xcschemes/xcschememanagement.plist b/DevourAndDrought/DevourAndDrought.xcodeproj/xcuserdata/micahgomez.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..9b3d313 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought.xcodeproj/xcuserdata/micahgomez.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + DevourAndDrought.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/DevourAndDrought/DevourAndDrought.xcodeproj/xcuserdata/penelopegomez.xcuserdatad/xcschemes/xcschememanagement.plist b/DevourAndDrought/DevourAndDrought.xcodeproj/xcuserdata/penelopegomez.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..9b3d313 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought.xcodeproj/xcuserdata/penelopegomez.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + DevourAndDrought.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/DevourAndDrought/DevourAndDrought/AppDelegate.swift b/DevourAndDrought/DevourAndDrought/AppDelegate.swift new file mode 100644 index 0000000..66b171b --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// DevourAndDrought +// +// Created by Micah Gomez on 10/17/21. +// + +import UIKit + +@main +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/DevourAndDrought/DevourAndDrought/Assets.xcassets/AccentColor.colorset/Contents.json b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Contents.json b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..78d34c2 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "filename" : "Icon-App-20x20@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-20x20@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-29x29@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-29x29@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-40x40@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-40x40@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-60x60@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "Icon-App-60x60@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "Icon-App-20x20@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-20x20@2x-1.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-29x29@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-29x29@2x-1.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-40x40@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-40x40@2x-1.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-76x76@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "Icon-App-76x76@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "Icon-App-83.5x83.5@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "ItunesArtwork@2x.png", + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..a2ad010 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png new file mode 100644 index 0000000..be41fb5 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..be41fb5 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..c776533 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..99c5428 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png new file mode 100644 index 0000000..7c371ed Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..7c371ed Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..b726b05 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..be41fb5 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png new file mode 100644 index 0000000..fe44269 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..fe44269 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..451f76e Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..451f76e Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..4f63954 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..0f43667 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..3217b39 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..2e23519 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png new file mode 100644 index 0000000..939ccb8 Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/Contents.json b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/Contents.json b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/Contents.json new file mode 100644 index 0000000..7d2bff1 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "coollogo_com-13092940.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "coollogo_com-13092941.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "coollogo_com-13092942.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092940.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092940.png new file mode 100644 index 0000000..fbf874b Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092940.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092941.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092941.png new file mode 100644 index 0000000..fbf874b Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092941.png differ diff --git a/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092942.png b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092942.png new file mode 100644 index 0000000..fbf874b Binary files /dev/null and b/DevourAndDrought/DevourAndDrought/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092942.png differ diff --git a/DevourAndDrought/DevourAndDrought/Base.lproj/LaunchScreen.storyboard b/DevourAndDrought/DevourAndDrought/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..13e88aa --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DevourAndDrought/DevourAndDrought/Base.lproj/Main.storyboard b/DevourAndDrought/DevourAndDrought/Base.lproj/Main.storyboard new file mode 100644 index 0000000..753b254 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Base.lproj/Main.storyboard @@ -0,0 +1,662 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DevourAndDrought/DevourAndDrought/GameControllers.swift b/DevourAndDrought/DevourAndDrought/GameControllers.swift new file mode 100644 index 0000000..a651d62 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/GameControllers.swift @@ -0,0 +1,333 @@ +// +// ViewController.swift +// DevourAndDrought +// +// Created by Micah Gomez on 10/17/21. +// + +import UIKit + +class PlayerBoardController: UIViewController { + + @IBOutlet var playerNameLabel: UILabel! + + @IBOutlet var playerOilCount: UILabel! + @IBOutlet var playerWaterCount: UILabel! + @IBOutlet var playerWheatCount: UILabel! + @IBOutlet var playerCornCount: UILabel! + @IBOutlet var playerFishCount: UILabel! + @IBOutlet var playerCattleCount: UILabel! + @IBOutlet var medallionCount: UILabel! + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + } + + override func viewWillAppear(_ animated: Bool) { + + playerNameLabel.text = GlobalVars.currentPlayer.name + playerOilCount.text = String("") + playerWaterCount.text = String("") + playerWheatCount.text = String("") + playerCornCount.text = String("") + playerFishCount.text = String("") + playerCattleCount.text = String("") + medallionCount.text = String("") + + for _ in 0...GlobalVars.currentPlayer.oil { + playerOilCount.text?.append("πŸͺ”") + } + for _ in 0...GlobalVars.currentPlayer.water { + playerWaterCount.text?.append("πŸ’§") + } + for _ in 0...GlobalVars.currentPlayer.wheat { + playerWheatCount.text?.append("🌾") + } + for _ in 0...GlobalVars.currentPlayer.corn { + playerCornCount.text?.append("🌽") + } + for _ in 0...GlobalVars.currentPlayer.fish { + playerFishCount.text?.append("🐟") + } + for _ in 0...GlobalVars.currentPlayer.cattle { + playerCattleCount.text?.append("πŸ‚") + } + + playerOilCount.text?.remove(at: (playerOilCount.text?.firstIndex(of: "πŸͺ”"))!) + playerWaterCount.text?.remove(at: (playerWaterCount.text?.firstIndex(of: "πŸ’§"))!) + playerWheatCount.text?.remove(at: (playerWheatCount.text?.firstIndex(of: "🌾"))!) + playerCornCount.text?.remove(at: (playerCornCount.text?.firstIndex(of: "🌽"))!) + playerFishCount.text?.remove(at: (playerFishCount.text?.firstIndex(of: "🐟"))!) + playerCattleCount.text?.remove(at: (playerCattleCount.text?.firstIndex(of: "πŸ‚"))!) + + if(GlobalVars.currentPlayer.oil >= 10){ + playerOilCount.text?.append("β˜€οΈ") + } + if(GlobalVars.currentPlayer.water >= 10){ + playerWaterCount.text?.append("β˜€οΈ") + } + if(GlobalVars.currentPlayer.wheat >= 10){ + playerWheatCount.text?.append("β˜€οΈ") + } + if(GlobalVars.currentPlayer.corn >= 10){ + playerCornCount.text?.append("β˜€οΈ") + } + if(GlobalVars.currentPlayer.fish >= 10){ + playerFishCount.text?.append("β˜€οΈ") + } + if(GlobalVars.currentPlayer.cattle >= 10){ + playerCattleCount.text?.append("β˜€οΈ") + } + + for i in 0...9 { + if ((GlobalVars.currentPlayer.oil >= i)&&(GlobalVars.currentPlayer.water >= i)&&(GlobalVars.currentPlayer.wheat >= i)&&(GlobalVars.currentPlayer.corn >= i)&&(GlobalVars.currentPlayer.fish >= i)&&(GlobalVars.currentPlayer.cattle >= i)){ + medallionCount.text?.append("β˜€οΈ") + } + } + medallionCount.text?.remove(at: (medallionCount.text?.firstIndex(of: "β˜€οΈ"))!) + + } + + @IBAction func EndTurn(_ sender: Any) { + + print("year: \(GlobalVars.currentYear)") + print("playerCount: \(GlobalVars.playerCount)") + print("activePlayer: \(GlobalVars.activePlayerInt)") + + GlobalVars.players[GlobalVars.activePlayerInt] = GlobalVars.currentPlayer + + if((GlobalVars.currentYear == 6) && ((GlobalVars.activePlayerInt+1) == GlobalVars.playerCount)){ + let mainStoryboard = UIStoryboard(name: "Main", bundle: Bundle.main) + if let viewController = mainStoryboard.instantiateViewController(withIdentifier: "GameEndScreen") as? UIViewController { + self.present(viewController, animated: true, completion: nil) + } + } else { + + let mainStoryboard = UIStoryboard(name: "Main", bundle: Bundle.main) + if let viewController = mainStoryboard.instantiateViewController(withIdentifier: "PlayerStart") as? UIViewController { + self.present(viewController, animated: true, completion: nil) + } + } + + + } + + +} + +class GameBoardController: UIViewController { + + @IBOutlet var PlayerNameLabel: UILabel! + @IBOutlet var LbrPointsLbl: UILabel! + + @IBOutlet var ResourceSlot1: UIButton! + @IBOutlet var ResourceSlot2: UIButton! + @IBOutlet var ResourceSlot3: UIButton! + @IBOutlet var ResourceSlot4: UIButton! + @IBOutlet var ResourceSlot5: UIButton! + @IBOutlet var ResourceSlot6: UIButton! + @IBOutlet var ResourceSlot7: UIButton! + + @IBOutlet var AllResourceSlots : [UIButton]! + + //let buttonList:[UIButton] = [ResourceSlot1,ResourceSlot2,ResourceSlot3,ResourceSlot4,ResourceSlot5,ResourceSlot6,ResourceSlot7] + + var resourceList:[resource] = [] + //var resourceSlots:[resource] = [] + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + let resourceNames:[String] = ["Oil\nπŸͺ”","Water\nπŸ’§","Wheat\n🌾","Corn\n🌽","Fish\n🐟","Cattle\nπŸ‚"] + let resourceCosts:[Int] = [1,2,3,4,5,6] + + for i in 0...5 { + let createResource = resource() + createResource.name = resourceNames[i] + createResource.cost = resourceCosts[i] + resourceList.append(createResource) + } + + + if (GlobalVars.resourceSlots.count == 0){ + for y in 0...6 { + let createSlot = resourceList.randomElement() + print(createSlot?.name) + print(createSlot?.cost) + /*if(y == GlobalVars.currentYear){ + createSlot?.cost = createSlot!.cost - 1 + }*/ + GlobalVars.resourceSlots.append(createSlot!) + } + } + + //MARK: TODO: add cost after discount has been applied + for (index,item) in AllResourceSlots.enumerated() { + print(index,item) + //item.setTitle("\(GlobalVars.resourceSlots[index].name)", for: .normal) + //item.setTitle("\(GlobalVars.resourceSlots[index].name)\n/*\(GlobalVars.resourceSlots[index].cost)", for: .normal) + item.titleLabel?.numberOfLines = 0 + item.titleLabel?.lineBreakMode = NSLineBreakMode.byWordWrapping + item.titleLabel?.textAlignment = NSTextAlignment.center + //item.layer.shadowPath = UIBezierPath(rect: item.layer.bounds).cgPath + item.layer.shadowColor = UIColor.black.cgColor + item.layer.shadowRadius = 13.0 + item.layer.shadowOpacity = 0 + if(GlobalVars.currentYear == index){ + item.layer.borderColor = UIColor.green.cgColor + item.layer.borderWidth = 5 + } + if(GlobalVars.resourceSlots[GlobalVars.currentYear].name == GlobalVars.resourceSlots[index].name){ + item.setTitle("\(GlobalVars.resourceSlots[index].name)\n\((GlobalVars.resourceSlots[index].cost - 1))", for: .normal) + } else { + item.setTitle("\(GlobalVars.resourceSlots[index].name)\n\(GlobalVars.resourceSlots[index].cost)", for: .normal) + } + } + } + + override func viewWillAppear(_ animated: Bool) { + PlayerNameLabel.text = GlobalVars.players[GlobalVars.activePlayerInt].name + LbrPointsLbl.text = "Labor Points: \(GlobalVars.currentPlayer.laborpoints)" + } +/* + @IBAction func ResourceSlotOne(_ sender: Any) { + ResourceSlot1.setTitle("\(resourceSlots[0].name)\n\(resourceSlots[0].cost)", for: .normal) + } + + @IBAction func ResourceSlotTwo(_ sender: Any) { + ResourceSlot2.setTitle("\(resourceSlots[1].name)\n\(resourceSlots[1].cost)", for: .normal) + } + + @IBAction func ResourceSlotThree(_ sender: Any) { + ResourceSlot3.setTitle("\(resourceSlots[2].name)\n\(resourceSlots[2].cost)", for: .normal) + } + + @IBAction func ResourceSlotFour(_ sender: Any) { + ResourceSlot4.setTitle("\(resourceSlots[3].name)\n\(resourceSlots[3].cost)", for: .normal) + } + + @IBAction func ResourceSlotFive(_ sender: Any) { + ResourceSlot5.setTitle("\(resourceSlots[4].name)\n\(resourceSlots[4].cost)", for: .normal) + } + + @IBAction func ResourceSlotSix(_ sender: Any) { + ResourceSlot6.setTitle("\(resourceSlots[5].name)\n\(resourceSlots[5].cost)", for: .normal) + } + + @IBAction func ResourceSlotSeven(_ sender: UIButton) { + ResourceSlot7.setTitle("\(resourceSlots[6].name)\n\(resourceSlots[6].cost)", for: .normal) + } + */ + + @IBAction func boxTouched(_ sender: UIButton) { + let index = AllResourceSlots.index(of: sender)! + if !sender.isSelected{ + for (i, item) in GlobalVars.resourceSlots.enumerated() { + //print(i,item) + + AllResourceSlots[i].isSelected = false + AllResourceSlots[i].layer.shadowOpacity = 0 + if item.name == GlobalVars.resourceSlots[index].name { + AllResourceSlots[i].isSelected = true + AllResourceSlots[i].layer.shadowOpacity = 0.75 + } + } + } else { + if(AllResourceSlots[GlobalVars.currentYear].isSelected){ + if((GlobalVars.currentPlayer.laborpoints - (GlobalVars.resourceSlots[index].cost - 1)) >= 0){ + GlobalVars.currentPlayer.laborpoints = GlobalVars.currentPlayer.laborpoints - (GlobalVars.resourceSlots[index].cost - 1) + } else { + return + } + } else { + if((GlobalVars.currentPlayer.laborpoints - GlobalVars.resourceSlots[index].cost) >= 0){ + GlobalVars.currentPlayer.laborpoints = GlobalVars.currentPlayer.laborpoints - GlobalVars.resourceSlots[index].cost + } else { + return + } + + } + + + print("PURCHASED!!!") + for (i, item) in GlobalVars.resourceSlots.enumerated() { + if AllResourceSlots[i].isSelected { + addToInventory(name: GlobalVars.resourceSlots[i].name) + print("resource name: \(GlobalVars.resourceSlots[i].name)") + GlobalVars.resourceSlots[i] = resourceList.randomElement()! + /*AllResourceSlots[i].setTitle("\(GlobalVars.resourceSlots[i].name)\n\(GlobalVars.resourceSlots[i].cost)", for: .normal) + if(GlobalVars.resourceSlots[GlobalVars.currentYear].name == GlobalVars.resourceSlots[i].name){ + AllResourceSlots[i].setTitle("\(GlobalVars.resourceSlots[i].name)\n\((GlobalVars.resourceSlots[i].cost - 1))", for: .normal) + } else { + AllResourceSlots[i].setTitle("\(GlobalVars.resourceSlots[i].name)\n\(GlobalVars.resourceSlots[i].cost)", for: .normal) + }*/ + for (index,ii) in AllResourceSlots.enumerated() { + if(GlobalVars.resourceSlots[GlobalVars.currentYear].name == GlobalVars.resourceSlots[index].name){ + ii.setTitle("\(GlobalVars.resourceSlots[index].name)\n\((GlobalVars.resourceSlots[index].cost - 1))", for: .normal) + } else { + ii.setTitle("\(GlobalVars.resourceSlots[index].name)\n\(GlobalVars.resourceSlots[index].cost)", for: .normal) + } + } + } + AllResourceSlots[i].isSelected = false + AllResourceSlots[i].layer.shadowOpacity = 0 + LbrPointsLbl.text = "Labor Points: \(GlobalVars.currentPlayer.laborpoints)" + } + } + print(GlobalVars.currentPlayer.oil,GlobalVars.currentPlayer.water,GlobalVars.currentPlayer.wheat,GlobalVars.currentPlayer.corn,GlobalVars.currentPlayer.fish,GlobalVars.currentPlayer.cattle) + + } + + //MARK: TODO: DONT ALLOW PURCHASE IF NOT ENOUGH LABOR POINTS + func addToInventory(name: String){ + print("adding!") + switch(name) { + case "Oil\nπŸͺ”" : + GlobalVars.currentPlayer.oil = GlobalVars.currentPlayer.oil + 1 + if(GlobalVars.currentPlayer.oil > 10){ + GlobalVars.currentPlayer.oil = 10 + } + break; + case "Water\nπŸ’§" : + GlobalVars.currentPlayer.water = GlobalVars.currentPlayer.water + 1 + if(GlobalVars.currentPlayer.water > 10){ + GlobalVars.currentPlayer.water = 10 + } + break; + case "Wheat\n🌾" : + GlobalVars.currentPlayer.wheat = GlobalVars.currentPlayer.wheat + 1 + if(GlobalVars.currentPlayer.wheat > 10){ + GlobalVars.currentPlayer.wheat = 10 + } + break; + case "Corn\n🌽" : + GlobalVars.currentPlayer.corn = GlobalVars.currentPlayer.corn + 1 + if(GlobalVars.currentPlayer.corn > 10){ + GlobalVars.currentPlayer.corn = 10 + } + break; + case "Fish\n🐟" : + GlobalVars.currentPlayer.fish = GlobalVars.currentPlayer.fish + 1 + if(GlobalVars.currentPlayer.fish > 10){ + GlobalVars.currentPlayer.fish = 10 + } + break; + case "Cattle\nπŸ‚" : + GlobalVars.currentPlayer.cattle = GlobalVars.currentPlayer.cattle + 1 + if(GlobalVars.currentPlayer.cattle > 10){ + GlobalVars.currentPlayer.cattle = 10 + } + break; + + /* you can have any number of case statements */ + default : /* Optional */ + print("uh oh!") + } + } + +} diff --git a/DevourAndDrought/DevourAndDrought/Info.plist b/DevourAndDrought/DevourAndDrought/Info.plist new file mode 100644 index 0000000..dd3c9af --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/DevourAndDrought/DevourAndDrought/SceneDelegate.swift b/DevourAndDrought/DevourAndDrought/SceneDelegate.swift new file mode 100644 index 0000000..d1e12ac --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// DevourAndDrought +// +// Created by Micah Gomez on 10/17/21. +// + +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 necessarily 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/DevourAndDrought/DevourAndDrought/SetupControllers.swift b/DevourAndDrought/DevourAndDrought/SetupControllers.swift new file mode 100644 index 0000000..3c93838 --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/SetupControllers.swift @@ -0,0 +1,337 @@ +// +// SetupControllers.swift +// DevourAndDrought +// +// Created by Micah Gomez on 10/20/21. +// + +import Foundation +import UIKit + +class StartController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource { + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return 1 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + return 3 + } + + func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { + return String(row+2) + " Players" + } + + @IBOutlet var playerCountPicker: UIPickerView! + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + playerCountPicker.delegate = self + playerCountPicker.dataSource = self + } + + override func viewDidAppear(_ animated: Bool) { + GlobalVars.playerCount = 2 + GlobalVars.activePlayerInt = 0 + GlobalVars.currentYear = -1 + GlobalVars.players = [] + GlobalVars.currentPlayer = player() + GlobalVars.resourceSlots = [] + } + + @IBAction func StartGame(_ sender: Any) { + GlobalVars.playerCount = playerCountPicker.selectedRow(inComponent: 0) + 2 + } + + +} + +class NamesController: UIViewController { + + @IBOutlet var PlayerName: UILabel! + + @IBOutlet var PlayerNameField: UITextField! + + //var currentPlayerInt = 0 + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + override func viewDidAppear(_ animated: Bool) { + //currentPlayerInt = 0 + PlayerNameField.becomeFirstResponder() + } + + @IBAction func PlayerNextBtn(_ sender: Any) { + let createNewPlayer:player = player() + createNewPlayer.name = PlayerNameField.text ?? "Player \(GlobalVars.activePlayerInt+1)" + GlobalVars.players.append(createNewPlayer) + GlobalVars.activePlayerInt = GlobalVars.activePlayerInt+1 + if (GlobalVars.activePlayerInt == GlobalVars.playerCount) { + print("all players named!") + let mainStoryboard = UIStoryboard(name: "Main", bundle: Bundle.main) + if let viewController = mainStoryboard.instantiateViewController(withIdentifier: "PlayerStart") as? UIViewController { + self.present(viewController, animated: true, completion: nil) + } + } else { + PlayerName.text = "Player \(GlobalVars.activePlayerInt+1) Name:" + PlayerNameField.text = "" + } + } + + +} + +class PlayerStartController: UIViewController { + + @IBOutlet var playerNameLabel: UILabel! + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + if (GlobalVars.activePlayerInt < GlobalVars.playerCount-1) { + GlobalVars.activePlayerInt = GlobalVars.activePlayerInt + 1 + + } else { + GlobalVars.activePlayerInt = 0 + } + + print("player: \(GlobalVars.activePlayerInt)") + + GlobalVars.currentPlayer = GlobalVars.players[GlobalVars.activePlayerInt] + + + if(GlobalVars.activePlayerInt == 0){ //NEW YEAR + GlobalVars.newYear() + } + + playerNameLabel.text = GlobalVars.currentPlayer.name + } + + @IBAction func BeginTurnButton(_ sender: Any) { + + let mainStoryboard = UIStoryboard(name: "Main", bundle: Bundle.main) + if let viewController = mainStoryboard.instantiateViewController(withIdentifier: "GameView") as? UIViewController { + self.present(viewController, animated: false, completion: nil) + } + + } +} + +class GameEndController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource { + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return GlobalVars.playerCount + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + return 8 + } + + func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { + var printString:String = "" + switch(row) { + case 0 : + printString = GlobalVars.players[component].name + break; + case 1 : + printString = "β˜€οΈ \(GlobalVars.players[component].medallions)" + break; + case 2 : + printString = "πŸͺ” \(GlobalVars.players[component].oil)" + break; + case 3 : + printString = "πŸ’§ \(GlobalVars.players[component].water)" + break; + case 4 : + printString = "🌾 \(GlobalVars.players[component].wheat)" + break; + case 5 : + printString = "🌽 \(GlobalVars.players[component].corn)" + break; + case 6 : + printString = "🐟 \(GlobalVars.players[component].fish)" + break; + case 7 : + printString = "πŸ‚ \(GlobalVars.players[component].cattle)" + break; + + + + /* you can have any number of case statements */ + default : /* Optional */ + printString = "Error!" + } + + return printString + } + + @IBOutlet var playerStats: UIPickerView! + @IBOutlet var winnerLabel: UILabel! + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + for p in GlobalVars.players{ + + + print("Oil Count \(p.name): \(p.oil)") + if(p.oil >= 10){ + p.medallions = p.medallions + 1 + print("oil row complete! \(p.medallions) medals") + } + print("Water Count \(p.name): \(p.water)") + if(p.water >= 10){ + p.medallions = p.medallions + 1 + print("water row complete! \(p.medallions) medals") + } + print("Wheat Count \(p.name): \(p.wheat)") + if(p.wheat >= 10){ + p.medallions = p.medallions + 1 + print("wheat row complete! \(p.medallions) medals") + } + print("Corn Count \(p.name): \(p.corn)") + if(p.corn >= 10){ + p.medallions = p.medallions + 1 + print("corn row complete! \(p.medallions) medals") + } + print("Fish Count \(p.name): \(p.fish)") + if(p.fish >= 10){ + p.medallions = p.medallions + 1 + print("fish row complete! \(p.medallions) medals") + } + print("Cattle Count \(p.name): \(p.cattle)") + if(p.cattle >= 10){ + p.medallions = p.medallions + 1 + print("cattle row complete! \(p.medallions) medals") + } + + for i in 1...10 { + if ((p.oil >= i)&&(p.water >= i)&&(p.wheat >= i)&&(p.corn >= i)&&(p.fish >= i)&&(p.cattle >= i)){ + p.medallions = p.medallions + 1 + print("column \(i) complete! \(p.medallions) medals") + } + } + + playerStats.reloadAllComponents() + + } + + //let winnerPlayer = GlobalVars.players.max { a, b in a.medallions < b.medallions } + + var winnerPlayer = player() + winnerPlayer.medallions = -1 + var winnerList:[player] = [winnerPlayer] + var oldWinnerList:[player] = [] + var winnerString:String = "" + + for (index, value) in GlobalVars.players.enumerated() { + if (value.medallions > winnerList[0].medallions){ + winnerList = [] + winnerList.append(value) + } else if (value.medallions == winnerList[0].medallions){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + oldWinnerList = winnerList + winnerList = [winnerPlayer] + for (index, value) in oldWinnerList.enumerated() { + if (value.cattle > winnerList[0].cattle){ + winnerList = [] + winnerList.append(value) + } else if (value.cattle == winnerList[0].cattle){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + oldWinnerList = winnerList + winnerList = [winnerPlayer] + for (index, value) in oldWinnerList.enumerated() { + if (value.fish > winnerList[0].fish){ + winnerList = [] + winnerList.append(value) + } else if (value.fish == winnerList[0].fish){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + oldWinnerList = winnerList + winnerList = [winnerPlayer] + for (index, value) in oldWinnerList.enumerated() { + if (value.corn > winnerList[0].corn){ + winnerList = [] + winnerList.append(value) + } else if (value.corn == winnerList[0].corn){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + oldWinnerList = winnerList + winnerList = [winnerPlayer] + for (index, value) in oldWinnerList.enumerated() { + if (value.wheat > winnerList[0].wheat){ + winnerList = [] + winnerList.append(value) + } else if (value.wheat == winnerList[0].wheat){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + oldWinnerList = winnerList + winnerList = [winnerPlayer] + for (index, value) in oldWinnerList.enumerated() { + if (value.water > winnerList[0].water){ + winnerList = [] + winnerList.append(value) + } else if (value.water == winnerList[0].water){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + oldWinnerList = winnerList + winnerList = [winnerPlayer] + for (index, value) in oldWinnerList.enumerated() { + if (value.oil > winnerList[0].oil){ + winnerList = [] + winnerList.append(value) + } else if (value.oil == winnerList[0].oil){ + winnerList.append(value) + } + } + if(winnerList.count > 1){ + print("holy shit a tie") + winnerString = "It's a tie!" + } + } + } + } + } + } + } + + + if (winnerList.count == 1){ + winnerString = "\(winnerList[0].name) Wins!" + } + + winnerLabel.text = winnerString + + playerStats.delegate = self + playerStats.dataSource = self + } + + @IBAction func StartGame(_ sender: Any) { + print("New game!") + //GlobalVars.playerCount = playerCountPicker.selectedRow(inComponent: 0) + 2 + } +} + + +//MARK: TODO: MULTIPEER CONNECTIVITY? +//MARK: TODO: CPU PLAYERS diff --git a/DevourAndDrought/DevourAndDrought/SupportingClasses.swift b/DevourAndDrought/DevourAndDrought/SupportingClasses.swift new file mode 100644 index 0000000..82ab3ee --- /dev/null +++ b/DevourAndDrought/DevourAndDrought/SupportingClasses.swift @@ -0,0 +1,70 @@ +// +// SupportingClasses.swift +// DevourAndDrought +// +// Created by Micah Gomez on 10/20/21. +// + +import Foundation + +class resource : Codable { + + var name:String = "" + var cost:Int = 0 + +} + +class player : Codable { + + var name:String = "" + var laborpoints:Int = 0 + var oil:Int = 0 + var water:Int = 0 + var wheat:Int = 0 + var corn:Int = 0 + var fish:Int = 0 + var cattle:Int = 0 + var medallions:Int = 0 + +} + +struct GlobalVars { + + static var playerCount:Int = 2 + static var activePlayerInt:Int = 0 + static var currentYear = -1 + static var players:[player] = [] + static var currentPlayer:player = player() + static var resourceSlots:[resource] = [] + + func endTurn() { + + + + } + + func nextPlayer() { + + + + } + + func gameEnd() { + + + + } + + static func newYear() { + + for p in GlobalVars.players { + p.laborpoints = p.laborpoints+6 + if (p.laborpoints > 13){ + p.laborpoints = 13 + } + } + GlobalVars.currentYear = GlobalVars.currentYear + 1 + + } + +} diff --git a/DevourAndDrought/DevourAndDroughtTests/DevourAndDroughtTests.swift b/DevourAndDrought/DevourAndDroughtTests/DevourAndDroughtTests.swift new file mode 100644 index 0000000..43de9d5 --- /dev/null +++ b/DevourAndDrought/DevourAndDroughtTests/DevourAndDroughtTests.swift @@ -0,0 +1,33 @@ +// +// DevourAndDroughtTests.swift +// DevourAndDroughtTests +// +// Created by Micah Gomez on 10/17/21. +// + +import XCTest +@testable import DevourAndDrought + +class DevourAndDroughtTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // 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/DevourAndDrought/DevourAndDroughtUITests/DevourAndDroughtUITests.swift b/DevourAndDrought/DevourAndDroughtUITests/DevourAndDroughtUITests.swift new file mode 100644 index 0000000..e24acc5 --- /dev/null +++ b/DevourAndDrought/DevourAndDroughtUITests/DevourAndDroughtUITests.swift @@ -0,0 +1,42 @@ +// +// DevourAndDroughtUITests.swift +// DevourAndDroughtUITests +// +// Created by Micah Gomez on 10/17/21. +// + +import XCTest + +class DevourAndDroughtUITests: XCTestCase { + + override func setUpWithError() throws { + // 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 tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // 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() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/DevourAndDrought/DevourAndDroughtUITests/DevourAndDroughtUITestsLaunchTests.swift b/DevourAndDrought/DevourAndDroughtUITests/DevourAndDroughtUITestsLaunchTests.swift new file mode 100644 index 0000000..13c5099 --- /dev/null +++ b/DevourAndDrought/DevourAndDroughtUITests/DevourAndDroughtUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// DevourAndDroughtUITestsLaunchTests.swift +// DevourAndDroughtUITests +// +// Created by Micah Gomez on 10/17/21. +// + +import XCTest + +class DevourAndDroughtUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +}