commit e497e18cc7c9a1f27689016d3fec4a397fdb95b5 Author: majean5 Date: Mon Jun 3 15:50:29 2024 +0200 :wheelchair: réparation :contruction: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0bb5319 --- /dev/null +++ b/.gitignore @@ -0,0 +1,128 @@ +# ---> Swift +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +# *.xcodeproj +# +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# Accio dependency management +Dependencies/ +.accio/ + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +# ---> Xcode +## User settings +xcuserdata/ + +## Xcode 8 and earlier +*.xcscmblueprint +*.xccheckout + +# ---> macOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + diff --git a/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.pbxproj b/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4bc3b35 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.pbxproj @@ -0,0 +1,700 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 7B3B17642BF24B32002BC817 /* Player.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B3B17632BF24B32002BC817 /* Player.swift */; }; + 7B3B17672BF24ED6002BC817 /* FullButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B3B17662BF24ED6002BC817 /* FullButtonStyle.swift */; }; + 7B4508CD2BF206AF0027E1EF /* DouShouQiIOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508CC2BF206AF0027E1EF /* DouShouQiIOSApp.swift */; }; + 7B4508CF2BF206AF0027E1EF /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508CE2BF206AF0027E1EF /* ContentView.swift */; }; + 7B4508D12BF206B10027E1EF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B4508D02BF206B10027E1EF /* Assets.xcassets */; }; + 7B4508D42BF206B10027E1EF /* Preview Assets in Resources */ = {isa = PBXBuildFile; fileRef = 7B4508D32BF206B10027E1EF /* Preview Assets */; }; + 7B4508DE2BF206B10027E1EF /* DouShouQiIOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508DD2BF206B10027E1EF /* DouShouQiIOSTests.swift */; }; + 7B4508E82BF206B10027E1EF /* DouShouQiIOSUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508E72BF206B10027E1EF /* DouShouQiIOSUITests.swift */; }; + 7B4508EA2BF206B10027E1EF /* DouShouQiIOSUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508E92BF206B10027E1EF /* DouShouQiIOSUITestsLaunchTests.swift */; }; + 7B4508F72BF2084B0027E1EF /* PlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508F62BF2084B0027E1EF /* PlayerView.swift */; }; + 7B4508FA2BF214F50027E1EF /* PlayerListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4508F92BF214F50027E1EF /* PlayerListView.swift */; }; + 7B6426F22C00B61500575E16 /* DSQ.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B6426F12C00B61500575E16 /* DSQ.xcframework */; }; + 7B6426F72C00B81400575E16 /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6426F62C00B81400575E16 /* GameScene.swift */; }; + 7B6426F92C00BDEA00575E16 /* SpriteKitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6426F82C00BDEA00575E16 /* SpriteKitView.swift */; }; + 7B6426FB2C00BFF500575E16 /* SpriteMeeple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6426FA2C00BFF500575E16 /* SpriteMeeple.swift */; }; + 7BB279892BFDF79E00491801 /* GameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BB279882BFDF79E00491801 /* GameView.swift */; }; + 7BDD43C72BFCC927003984FB /* MainMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDD43C62BFCC927003984FB /* MainMenuView.swift */; }; + 7BDD43C92BFCD2C4003984FB /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDD43C82BFCD2C4003984FB /* HistoryView.swift */; }; + 7BE8C5652C09A29A00A6E8C9 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BE8C5642C09A29A00A6E8C9 /* Color.swift */; }; + BA5AFD332C09C7470056D332 /* ClassicTextDisplay.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA5AFD322C09C7470056D332 /* ClassicTextDisplay.swift */; }; + BA5AFD352C09CAC10056D332 /* NavButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA5AFD342C09CAC10056D332 /* NavButton.swift */; }; + BA5AFD392C09D1020056D332 /* DoubleTextDisplay.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA5AFD382C09D1020056D332 /* DoubleTextDisplay.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 7B4508DA2BF206B10027E1EF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B4508C12BF206AF0027E1EF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7B4508C82BF206AF0027E1EF; + remoteInfo = DouShouQiIOS; + }; + 7B4508E42BF206B10027E1EF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B4508C12BF206AF0027E1EF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7B4508C82BF206AF0027E1EF; + remoteInfo = DouShouQiIOS; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 7B3B17632BF24B32002BC817 /* Player.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Player.swift; sourceTree = ""; }; + 7B3B17662BF24ED6002BC817 /* FullButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullButtonStyle.swift; sourceTree = ""; }; + 7B4508C92BF206AF0027E1EF /* DouShouQiIOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DouShouQiIOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B4508CC2BF206AF0027E1EF /* DouShouQiIOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQiIOSApp.swift; sourceTree = ""; }; + 7B4508CE2BF206AF0027E1EF /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 7B4508D02BF206B10027E1EF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7B4508D32BF206B10027E1EF /* Preview Assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Preview Assets"; sourceTree = ""; }; + 7B4508D92BF206B10027E1EF /* DouShouQiIOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DouShouQiIOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B4508DD2BF206B10027E1EF /* DouShouQiIOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQiIOSTests.swift; sourceTree = ""; }; + 7B4508E32BF206B10027E1EF /* DouShouQiIOSUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DouShouQiIOSUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B4508E72BF206B10027E1EF /* DouShouQiIOSUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQiIOSUITests.swift; sourceTree = ""; }; + 7B4508E92BF206B10027E1EF /* DouShouQiIOSUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQiIOSUITestsLaunchTests.swift; sourceTree = ""; }; + 7B4508F62BF2084B0027E1EF /* PlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerView.swift; sourceTree = ""; }; + 7B4508F92BF214F50027E1EF /* PlayerListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerListView.swift; sourceTree = ""; }; + 7B6426F12C00B61500575E16 /* DSQ.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = DSQ.xcframework; path = ../../SwiftUI_ARKit_2024/XCFramework/DSQ.xcframework; sourceTree = ""; }; + 7B6426F52C00B69200575E16 /* DSQ_CLI */ = {isa = PBXFileReference; lastKnownFileType = folder; name = DSQ_CLI; path = ../../SwiftUI_ARKit_2024/XCFramework/DSQ_CLI; sourceTree = ""; }; + 7B6426F62C00B81400575E16 /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = ""; }; + 7B6426F82C00BDEA00575E16 /* SpriteKitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpriteKitView.swift; sourceTree = ""; }; + 7B6426FA2C00BFF500575E16 /* SpriteMeeple.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpriteMeeple.swift; sourceTree = ""; }; + 7BB279882BFDF79E00491801 /* GameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameView.swift; sourceTree = ""; }; + 7BDD43C62BFCC927003984FB /* MainMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = ""; }; + 7BDD43C82BFCD2C4003984FB /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; + 7BE8C5642C09A29A00A6E8C9 /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; + BA5AFD322C09C7470056D332 /* ClassicTextDisplay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassicTextDisplay.swift; sourceTree = ""; }; + BA5AFD342C09CAC10056D332 /* NavButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavButton.swift; sourceTree = ""; }; + BA5AFD382C09D1020056D332 /* DoubleTextDisplay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleTextDisplay.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7B4508C62BF206AF0027E1EF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B6426F22C00B61500575E16 /* DSQ.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B4508D62BF206B10027E1EF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B4508E02BF206B10027E1EF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7B3B17622BF24B23002BC817 /* Class */ = { + isa = PBXGroup; + children = ( + 7B3B17632BF24B32002BC817 /* Player.swift */, + 7B6426F62C00B81400575E16 /* GameScene.swift */, + 7B6426FA2C00BFF500575E16 /* SpriteMeeple.swift */, + ); + path = Class; + sourceTree = ""; + }; + 7B3B17652BF24EB1002BC817 /* Struct */ = { + isa = PBXGroup; + children = ( + 7B3B17662BF24ED6002BC817 /* FullButtonStyle.swift */, + ); + path = Struct; + sourceTree = ""; + }; + 7B4508C02BF206AF0027E1EF = { + isa = PBXGroup; + children = ( + 7B4508CB2BF206AF0027E1EF /* DouShouQiIOS */, + 7B4508DC2BF206B10027E1EF /* DouShouQiIOSTests */, + 7B4508E62BF206B10027E1EF /* DouShouQiIOSUITests */, + 7B4508CA2BF206AF0027E1EF /* Products */, + 7B6426F02C00B61500575E16 /* Frameworks */, + ); + sourceTree = ""; + }; + 7B4508CA2BF206AF0027E1EF /* Products */ = { + isa = PBXGroup; + children = ( + 7B4508C92BF206AF0027E1EF /* DouShouQiIOS.app */, + 7B4508D92BF206B10027E1EF /* DouShouQiIOSTests.xctest */, + 7B4508E32BF206B10027E1EF /* DouShouQiIOSUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 7B4508CB2BF206AF0027E1EF /* DouShouQiIOS */ = { + isa = PBXGroup; + children = ( + BA5AFD312C09C6E90056D332 /* ContentView */, + 7BE8C5632C09A27600A6E8C9 /* Extension */, + 7B3B17652BF24EB1002BC817 /* Struct */, + 7B3B17622BF24B23002BC817 /* Class */, + 7BB801372BF2374C00413951 /* Style */, + 7B4508CC2BF206AF0027E1EF /* DouShouQiIOSApp.swift */, + 7B4508CE2BF206AF0027E1EF /* ContentView.swift */, + 7B4508D02BF206B10027E1EF /* Assets.xcassets */, + 7B4508F82BF2085B0027E1EF /* View */, + 7B4508D22BF206B10027E1EF /* Preview Content */, + ); + path = DouShouQiIOS; + sourceTree = ""; + }; + 7B4508D22BF206B10027E1EF /* Preview Content */ = { + isa = PBXGroup; + children = ( + 7B4508D32BF206B10027E1EF /* Preview Assets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 7B4508DC2BF206B10027E1EF /* DouShouQiIOSTests */ = { + isa = PBXGroup; + children = ( + 7B4508DD2BF206B10027E1EF /* DouShouQiIOSTests.swift */, + ); + path = DouShouQiIOSTests; + sourceTree = ""; + }; + 7B4508E62BF206B10027E1EF /* DouShouQiIOSUITests */ = { + isa = PBXGroup; + children = ( + 7B4508E72BF206B10027E1EF /* DouShouQiIOSUITests.swift */, + 7B4508E92BF206B10027E1EF /* DouShouQiIOSUITestsLaunchTests.swift */, + ); + path = DouShouQiIOSUITests; + sourceTree = ""; + }; + 7B4508F82BF2085B0027E1EF /* View */ = { + isa = PBXGroup; + children = ( + 7B4508F62BF2084B0027E1EF /* PlayerView.swift */, + 7B4508F92BF214F50027E1EF /* PlayerListView.swift */, + 7BDD43C62BFCC927003984FB /* MainMenuView.swift */, + 7BDD43C82BFCD2C4003984FB /* HistoryView.swift */, + 7BB279882BFDF79E00491801 /* GameView.swift */, + 7B6426F82C00BDEA00575E16 /* SpriteKitView.swift */, + ); + path = View; + sourceTree = ""; + }; + 7B6426F02C00B61500575E16 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7B6426F52C00B69200575E16 /* DSQ_CLI */, + 7B6426F12C00B61500575E16 /* DSQ.xcframework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 7BB801372BF2374C00413951 /* Style */ = { + isa = PBXGroup; + children = ( + ); + path = Style; + sourceTree = ""; + }; + 7BE8C5632C09A27600A6E8C9 /* Extension */ = { + isa = PBXGroup; + children = ( + 7BE8C5642C09A29A00A6E8C9 /* Color.swift */, + ); + path = Extension; + sourceTree = ""; + }; + BA5AFD312C09C6E90056D332 /* ContentView */ = { + isa = PBXGroup; + children = ( + BA5AFD322C09C7470056D332 /* ClassicTextDisplay.swift */, + BA5AFD342C09CAC10056D332 /* NavButton.swift */, + BA5AFD382C09D1020056D332 /* DoubleTextDisplay.swift */, + ); + path = ContentView; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7B4508C82BF206AF0027E1EF /* DouShouQiIOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B4508ED2BF206B10027E1EF /* Build configuration list for PBXNativeTarget "DouShouQiIOS" */; + buildPhases = ( + 7B4508C52BF206AF0027E1EF /* Sources */, + 7B4508C62BF206AF0027E1EF /* Frameworks */, + 7B4508C72BF206AF0027E1EF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DouShouQiIOS; + productName = DouShouQiIOS; + productReference = 7B4508C92BF206AF0027E1EF /* DouShouQiIOS.app */; + productType = "com.apple.product-type.application"; + }; + 7B4508D82BF206B10027E1EF /* DouShouQiIOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B4508F02BF206B10027E1EF /* Build configuration list for PBXNativeTarget "DouShouQiIOSTests" */; + buildPhases = ( + 7B4508D52BF206B10027E1EF /* Sources */, + 7B4508D62BF206B10027E1EF /* Frameworks */, + 7B4508D72BF206B10027E1EF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7B4508DB2BF206B10027E1EF /* PBXTargetDependency */, + ); + name = DouShouQiIOSTests; + productName = DouShouQiIOSTests; + productReference = 7B4508D92BF206B10027E1EF /* DouShouQiIOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 7B4508E22BF206B10027E1EF /* DouShouQiIOSUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B4508F32BF206B10027E1EF /* Build configuration list for PBXNativeTarget "DouShouQiIOSUITests" */; + buildPhases = ( + 7B4508DF2BF206B10027E1EF /* Sources */, + 7B4508E02BF206B10027E1EF /* Frameworks */, + 7B4508E12BF206B10027E1EF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7B4508E52BF206B10027E1EF /* PBXTargetDependency */, + ); + name = DouShouQiIOSUITests; + productName = DouShouQiIOSUITests; + productReference = 7B4508E32BF206B10027E1EF /* DouShouQiIOSUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7B4508C12BF206AF0027E1EF /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + 7B4508C82BF206AF0027E1EF = { + CreatedOnToolsVersion = 14.2; + }; + 7B4508D82BF206B10027E1EF = { + CreatedOnToolsVersion = 14.2; + TestTargetID = 7B4508C82BF206AF0027E1EF; + }; + 7B4508E22BF206B10027E1EF = { + CreatedOnToolsVersion = 14.2; + TestTargetID = 7B4508C82BF206AF0027E1EF; + }; + }; + }; + buildConfigurationList = 7B4508C42BF206AF0027E1EF /* Build configuration list for PBXProject "DouShouQiIOS" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7B4508C02BF206AF0027E1EF; + productRefGroup = 7B4508CA2BF206AF0027E1EF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7B4508C82BF206AF0027E1EF /* DouShouQiIOS */, + 7B4508D82BF206B10027E1EF /* DouShouQiIOSTests */, + 7B4508E22BF206B10027E1EF /* DouShouQiIOSUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7B4508C72BF206AF0027E1EF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B4508D42BF206B10027E1EF /* Preview Assets in Resources */, + 7B4508D12BF206B10027E1EF /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B4508D72BF206B10027E1EF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B4508E12BF206B10027E1EF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7B4508C52BF206AF0027E1EF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B6426F72C00B81400575E16 /* GameScene.swift in Sources */, + 7B4508F72BF2084B0027E1EF /* PlayerView.swift in Sources */, + 7BDD43C72BFCC927003984FB /* MainMenuView.swift in Sources */, + 7B4508CF2BF206AF0027E1EF /* ContentView.swift in Sources */, + 7BE8C5652C09A29A00A6E8C9 /* Color.swift in Sources */, + 7B6426FB2C00BFF500575E16 /* SpriteMeeple.swift in Sources */, + 7B4508CD2BF206AF0027E1EF /* DouShouQiIOSApp.swift in Sources */, + 7B6426F92C00BDEA00575E16 /* SpriteKitView.swift in Sources */, + BA5AFD392C09D1020056D332 /* DoubleTextDisplay.swift in Sources */, + BA5AFD332C09C7470056D332 /* ClassicTextDisplay.swift in Sources */, + BA5AFD352C09CAC10056D332 /* NavButton.swift in Sources */, + 7BB279892BFDF79E00491801 /* GameView.swift in Sources */, + 7BDD43C92BFCD2C4003984FB /* HistoryView.swift in Sources */, + 7B3B17642BF24B32002BC817 /* Player.swift in Sources */, + 7B3B17672BF24ED6002BC817 /* FullButtonStyle.swift in Sources */, + 7B4508FA2BF214F50027E1EF /* PlayerListView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B4508D52BF206B10027E1EF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B4508DE2BF206B10027E1EF /* DouShouQiIOSTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B4508DF2BF206B10027E1EF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B4508EA2BF206B10027E1EF /* DouShouQiIOSUITestsLaunchTests.swift in Sources */, + 7B4508E82BF206B10027E1EF /* DouShouQiIOSUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 7B4508DB2BF206B10027E1EF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7B4508C82BF206AF0027E1EF /* DouShouQiIOS */; + targetProxy = 7B4508DA2BF206B10027E1EF /* PBXContainerItemProxy */; + }; + 7B4508E52BF206B10027E1EF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7B4508C82BF206AF0027E1EF /* DouShouQiIOS */; + targetProxy = 7B4508E42BF206B10027E1EF /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 7B4508EB2BF206B10027E1EF /* 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++20"; + 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 = 16.2; + 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; + }; + 7B4508EC2BF206B10027E1EF /* 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++20"; + 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 = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7B4508EE2BF206B10027E1EF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"DouShouQiIOS/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.DouShouQiIOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7B4508EF2BF206B10027E1EF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"DouShouQiIOS/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.DouShouQiIOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 7B4508F12BF206B10027E1EF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.DouShouQiIOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DouShouQiIOS.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/DouShouQiIOS"; + }; + name = Debug; + }; + 7B4508F22BF206B10027E1EF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.DouShouQiIOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DouShouQiIOS.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/DouShouQiIOS"; + }; + name = Release; + }; + 7B4508F42BF206B10027E1EF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.DouShouQiIOSUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DouShouQiIOS; + }; + name = Debug; + }; + 7B4508F52BF206B10027E1EF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.DouShouQiIOSUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DouShouQiIOS; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7B4508C42BF206AF0027E1EF /* Build configuration list for PBXProject "DouShouQiIOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B4508EB2BF206B10027E1EF /* Debug */, + 7B4508EC2BF206B10027E1EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B4508ED2BF206B10027E1EF /* Build configuration list for PBXNativeTarget "DouShouQiIOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B4508EE2BF206B10027E1EF /* Debug */, + 7B4508EF2BF206B10027E1EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B4508F02BF206B10027E1EF /* Build configuration list for PBXNativeTarget "DouShouQiIOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B4508F12BF206B10027E1EF /* Debug */, + 7B4508F22BF206B10027E1EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B4508F32BF206B10027E1EF /* Build configuration list for PBXNativeTarget "DouShouQiIOSUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B4508F42BF206B10027E1EF /* Debug */, + 7B4508F52BF206B10027E1EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7B4508C12BF206AF0027E1EF /* Project object */; +} diff --git a/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/AccentColor.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Blob.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Blob.imageset/Contents.json new file mode 100644 index 0000000..54e3985 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Blob.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "edbacace5f621ae77077f206ebdcee27.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Blob.imageset/edbacace5f621ae77077f206ebdcee27.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Blob.imageset/edbacace5f621ae77077f206ebdcee27.png new file mode 100644 index 0000000..d1c88d9 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Blob.imageset/edbacace5f621ae77077f206ebdcee27.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/BoardImg.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/BoardImg.imageset/Contents.json new file mode 100644 index 0000000..e5d476d --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/BoardImg.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "board.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/BoardImg.imageset/board.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/BoardImg.imageset/board.png new file mode 100644 index 0000000..faea3d9 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/BoardImg.imageset/board.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/CatMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/CatMeeple.imageset/Contents.json new file mode 100644 index 0000000..dad62f1 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/CatMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Cat.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/CatMeeple.imageset/DSQ-Cat.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/CatMeeple.imageset/DSQ-Cat.png new file mode 100644 index 0000000..a5a6982 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/CatMeeple.imageset/DSQ-Cat.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorBG.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorBG.colorset/Contents.json new file mode 100644 index 0000000..bbfb2d9 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorBG.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x31", + "green" : "0x28", + "red" : "0x22" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorFont.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorFont.colorset/Contents.json new file mode 100644 index 0000000..72252b1 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorFont.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x31", + "green" : "0x28", + "red" : "0x22" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEE", + "green" : "0xEE", + "red" : "0xEE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorP1.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorP1.colorset/Contents.json new file mode 100644 index 0000000..35f97be --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorP1.colorset/Contents.json @@ -0,0 +1,33 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "universal", + "reference" : "systemYellowColor" + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x69", + "green" : "0xD3", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorP2.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorP2.colorset/Contents.json new file mode 100644 index 0000000..cabc0e4 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorP2.colorset/Contents.json @@ -0,0 +1,33 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "universal", + "reference" : "systemRedColor" + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3E", + "green" : "0x15", + "red" : "0xA0" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorPrimary.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorPrimary.colorset/Contents.json new file mode 100644 index 0000000..87868b2 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorPrimary.colorset/Contents.json @@ -0,0 +1,33 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "universal", + "reference" : "systemYellowColor" + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x46", + "green" : "0x3E", + "red" : "0x39" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorQuadiary.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorQuadiary.colorset/Contents.json new file mode 100644 index 0000000..35f97be --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorQuadiary.colorset/Contents.json @@ -0,0 +1,33 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "universal", + "reference" : "systemYellowColor" + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x69", + "green" : "0xD3", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorSecondary.colorset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorSecondary.colorset/Contents.json new file mode 100644 index 0000000..2536dc2 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ColorSecondary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DogoMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DogoMeeple.imageset/Contents.json new file mode 100644 index 0000000..ce70e45 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DogoMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Dog.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DogoMeeple.imageset/DSQ-Dog.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DogoMeeple.imageset/DSQ-Dog.png new file mode 100644 index 0000000..7a298c5 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DogoMeeple.imageset/DSQ-Dog.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DouShouQi.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DouShouQi.imageset/Contents.json new file mode 100644 index 0000000..428ea29 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DouShouQi.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Doushouqi_Logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DouShouQi.imageset/Doushouqi_Logo.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DouShouQi.imageset/Doushouqi_Logo.png new file mode 100644 index 0000000..2846207 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/DouShouQi.imageset/Doushouqi_Logo.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ElphMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ElphMeeple.imageset/Contents.json new file mode 100644 index 0000000..53fdd3d --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ElphMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Elph.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ElphMeeple.imageset/DSQ-Elph.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ElphMeeple.imageset/DSQ-Elph.png new file mode 100644 index 0000000..341ec25 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/ElphMeeple.imageset/DSQ-Elph.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LeoMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LeoMeeple.imageset/Contents.json new file mode 100644 index 0000000..75458cc --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LeoMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Leo 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LeoMeeple.imageset/DSQ-Leo 1.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LeoMeeple.imageset/DSQ-Leo 1.png new file mode 100644 index 0000000..e9b1d78 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LeoMeeple.imageset/DSQ-Leo 1.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LionMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LionMeeple.imageset/Contents.json new file mode 100644 index 0000000..294d2da --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LionMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Lion.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LionMeeple.imageset/DSQ-Lion.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LionMeeple.imageset/DSQ-Lion.png new file mode 100644 index 0000000..be5d8d5 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/LionMeeple.imageset/DSQ-Lion.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/RatMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/RatMeeple.imageset/Contents.json new file mode 100644 index 0000000..e5859b8 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/RatMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Rat.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/RatMeeple.imageset/DSQ-Rat.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/RatMeeple.imageset/DSQ-Rat.png new file mode 100644 index 0000000..4c00ab1 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/RatMeeple.imageset/DSQ-Rat.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/WolfMeeple.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/WolfMeeple.imageset/Contents.json new file mode 100644 index 0000000..19d41ca --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/WolfMeeple.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "DSQ-Wolf.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/WolfMeeple.imageset/DSQ-Wolf.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/WolfMeeple.imageset/DSQ-Wolf.png new file mode 100644 index 0000000..5e5c240 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/WolfMeeple.imageset/DSQ-Wolf.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/cat.imageset/Contents.json b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/cat.imageset/Contents.json new file mode 100644 index 0000000..e16775a --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/cat.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "catMeeple.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/cat.imageset/catMeeple.png b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/cat.imageset/catMeeple.png new file mode 100644 index 0000000..ab1ae10 Binary files /dev/null and b/DouShouQiIOS/DouShouQiIOS/Assets.xcassets/cat.imageset/catMeeple.png differ diff --git a/DouShouQiIOS/DouShouQiIOS/Class/GameScene.swift b/DouShouQiIOS/DouShouQiIOS/Class/GameScene.swift new file mode 100644 index 0000000..5821cf6 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Class/GameScene.swift @@ -0,0 +1,108 @@ +// +// GameScene.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 24/05/2024. +// + +import Foundation +import DouShouQiModel +import SpriteKit +import SwiftUI + +class GameScene : SKScene{ + let imgBoard : SKSpriteNode = SKSpriteNode(imageNamed: "BoardImg") + let defaultSize : CGSize = CGSize(width: 120, height: 120) + var game : Game = try! Game(withRules: ClassicRules(), + andPlayer1: Player(withName: "Meruemu", andId: .player1)!, + andPlayer2: Player(withName: "Kumogi", andId: .player2)!) + + let pieces : [ Owner : [Animal : SpriteMeeple]] = + [ .player1 : [ + .rat : SpriteMeeple(imageName: "RatMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .cat : SpriteMeeple(imageName: "CatMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .dog : SpriteMeeple(imageName: "DogoMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .wolf : SpriteMeeple(imageName: "WolfMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .leopard : SpriteMeeple(imageName: "LeoMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .tiger : SpriteMeeple(imageName: "CatMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .lion : SpriteMeeple(imageName: "LionMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + .elephant : SpriteMeeple(imageName: "ElphMeeple", size: CGSize(width: 120, height: 120), color: Color.player1), + ], + + .player2: [ + .rat : SpriteMeeple(imageName: "RatMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .cat : SpriteMeeple(imageName: "CatMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .dog : SpriteMeeple(imageName: "DogoMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .wolf : SpriteMeeple(imageName: "WolfMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .leopard : SpriteMeeple(imageName: "LeoMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .tiger : SpriteMeeple(imageName: "CatMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .lion : SpriteMeeple(imageName: "LionMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + .elephant : SpriteMeeple(imageName: "ElphMeeple", size: CGSize(width: 120, height: 120), color: Color.player2), + ] + ] + + override init(size s: CGSize){ + super.init(size: s) + self.addChild(imgBoard) + + self.displayBoard(game.board) + /* + let cat = SpriteMeeple(imageName: "CatMeeple") + cat.position = CGPoint(x: 300, y: 200) + cat.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(cat) + + let rat = SpriteMeeple(imageName: "RatMeeple") + rat.position = CGPoint(x: 200, y: 100) + rat.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(rat) + + let dog = SpriteMeeple(imageName: "DogoMeeple") + dog.position = CGPoint(x: 200, y: 300) + dog.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(dog) + + let cat2 = SpriteMeeple(imageName: "CatMeeple") + cat2.position = CGPoint(x: 300, y: -200) + cat2.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(cat2) + + let rat2 = SpriteMeeple(imageName: "RatMeeple") + rat2.position = CGPoint(x: 200, y: -100) + rat2.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(rat2) + + let dog2 = SpriteMeeple(imageName: "DogoMeeple") + dog2.position = CGPoint(x: 200, y: -300) + dog2.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(dog2) + + let wolf = SpriteMeeple(imageName: "WolfMeeple") + wolf.position = CGPoint(x: 300, y: 0) + wolf.imageNode.size = CGSize(width: 120, height: 120) + self.addChild(wolf) + */ + + + + self.scaleMode = .aspectFit + self.anchorPoint = CGPoint(x: 0.5, y:0.5) + } + + private func displayBoard(_ board : DouShouQiModel.Board){ + for row in 0.., with event: UIEvent?) { + self.position = touches.first?.location(in: parent!) ?? CGPoint(x: 0, y: 0) + } + + override func touchesEnded(_ touches: Set, with event: UIEvent?) { + + /// Bordures du board + ///Right + if (self.position.x < -400){ + self.position.x = -400; + } + + ///Left + if (self.position.x > 400){ + self.position.x = 400; + } + + ///Bottom + if (self.position.y < -300){ + self.position.y = -300; + } + + ///Top + if (self.position.y > 300){ + self.position.y = 300; + } + + if (!Int(self.position.x).isMultiple(of: 100)){ + let calcx = self.position.x/100.0; + self.position.x = (calcx.rounded(.toNearestOrAwayFromZero))*100; + } + + if (!Int(self.position.y).isMultiple(of: 100)){ + let calcy = self.position.y/100.0; + self.position.y = (calcy.rounded(.toNearestOrAwayFromZero))*100; + } + + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/ContentView.swift b/DouShouQiIOS/DouShouQiIOS/ContentView.swift new file mode 100644 index 0000000..98bd9cf --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/ContentView.swift @@ -0,0 +1,26 @@ +// +// ContentView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/ContentView/ClassicTextDisplay.swift b/DouShouQiIOS/DouShouQiIOS/ContentView/ClassicTextDisplay.swift new file mode 100644 index 0000000..90d7e08 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/ContentView/ClassicTextDisplay.swift @@ -0,0 +1,33 @@ +// +// ClassicTextDisplay.swift +// DouShouQiIOS +// +// Created by Mathilde Jean on 31/05/2024. +// + +import SwiftUI + +struct ClassicTextDisplay: View { + + let text : String + + init(text: String) { + self.text = text + } + + var body: some View { + Text("\(text)") + .font(.headline) + .frame(height: 50, alignment: .center) + .padding([.leading, .trailing], 20) + .background(Color.primaryColor) + .foregroundColor(Color.white) + .bold() + .cornerRadius(15) + + } +} + +#Preview { + ClassicTextDisplay(text: "test") +} diff --git a/DouShouQiIOS/DouShouQiIOS/ContentView/DoubleTextDisplay.swift b/DouShouQiIOS/DouShouQiIOS/ContentView/DoubleTextDisplay.swift new file mode 100644 index 0000000..1944cad --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/ContentView/DoubleTextDisplay.swift @@ -0,0 +1,41 @@ +// +// DoubleTextDisplay.swift +// DouShouQiIOS +// +// Created by Mathilde Jean on 31/05/2024. +// + +import SwiftUI + +struct DoubleTextDisplay: View { + let textL : String + let textR : String + + init(textL: String, textR: String) { + self.textL = textL + self.textR = textR + } + + var body: some View { + HStack{ + Text(textL) + .frame(height: 50, alignment: .center) + .padding([.leading, .trailing], 20) + .background(Color.yellow) + .foregroundColor(Color.white) + .bold() + .cornerRadius(15) + + Text(textR) + .foregroundColor(.yellow) + .padding([.leading], 10) + .padding([.trailing], 20) + }.overlay( + RoundedRectangle(cornerRadius: 15) + .stroke(.yellow, lineWidth: 3) + ) } +} + +#Preview { + DoubleTextDisplay(textL: "W/L", textR: "2") +} diff --git a/DouShouQiIOS/DouShouQiIOS/ContentView/NavButton.swift b/DouShouQiIOS/DouShouQiIOS/ContentView/NavButton.swift new file mode 100644 index 0000000..3d95d14 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/ContentView/NavButton.swift @@ -0,0 +1,37 @@ +// +// NavButton.swift +// DouShouQiIOS +// +// Created by Mathilde Jean on 31/05/2024. +// + +import SwiftUI + +struct NavButton: View { + + let text : String + let destinationView : () -> D1 + let hideBackButton : Bool + + init(_ text : String, @ViewBuilder destinationView: @escaping () -> D1, hideBackButton : Bool = false) { + self.text = text + self.destinationView = destinationView + self.hideBackButton = hideBackButton + } + + var body: some View { + NavigationLink(destination: destinationView().navigationBarBackButtonHidden(hideBackButton)) + { + Text("\(text)") + .font(.title2) + .padding() + .background(Color.primaryColor) + .foregroundColor(.white) + .cornerRadius(8) + } + } +} + +#Preview { + NavButton("Menu princ", destinationView: {MainMenuView()}) +} diff --git a/DouShouQiIOS/DouShouQiIOS/DouShouQiIOSApp.swift b/DouShouQiIOS/DouShouQiIOS/DouShouQiIOSApp.swift new file mode 100644 index 0000000..fd3f2d0 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/DouShouQiIOSApp.swift @@ -0,0 +1,22 @@ +// +// DouShouQiIOSApp.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import SwiftUI + +@main +struct DouShouQiIOSApp: App { + var body: some Scene { + WindowGroup { + NavigationStack { + ZStack{ + Rectangle().fill(Color.bgColor).edgesIgnoringSafeArea(.all) + MainMenuView().preferredColorScheme(.none) + } + } + } + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Extension/Color.swift b/DouShouQiIOS/DouShouQiIOS/Extension/Color.swift new file mode 100644 index 0000000..e884c78 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Extension/Color.swift @@ -0,0 +1,77 @@ +// +// Color.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 31/05/2024. +// + +import Foundation +import SwiftUI + +public extension Color { + init(hex: String) { + let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted) + var int: UInt64 = 0 + Scanner(string: hex).scanHexInt64(&int) + let a, r, g, b: UInt64 + switch hex.count { + case 3: // RGB (12-bit) + (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17) + case 6: // RGB (24-bit) + (a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF) + case 8: // ARGB (32-bit) + (a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF) + default: + (a, r, g, b) = (1, 1, 1, 0) + } + + self.init( + .sRGB, + red: Double(r) / 255, + green: Double(g) / 255, + blue: Double(b) / 255, + opacity: Double(a) / 255 + ) + } + + + static let primaryColor : Color = Color("ColorPrimary") + static let secondaryColor : Color = Color.orange.opacity(0.3) + static let tertiaryColor : Color = Color.orange + static let QuadiaryColor : Color = Color.yellow + + static let player1 : Color = Color("ColorP1") + static let player2 : Color = Color("ColorP2") + + static let bgColor : Color = Color("ColorBG") + static let fontColor : Color = Color("ColorFont") + + + /* + ///Light + static let primaryColor : Color = Color.yellow + static let secondaryColor : Color = Color.orange.opacity(0.3) + static let tertiaryColor : Color = Color.orange + static let QuadiaryColor : Color = Color.yellow + + static let player1 : Color = Color.yellow + static let player2 : Color = Color.red + + static let bgColor : Color = Color.white + static let fontColor : Color = Color(hex: "222831") + + + ///Dark + static let primaryColorDark : Color = Color(hex: "393E46") + static let secondaryColorDark : Color = Color.gray.opacity(0.3) + static let tertiaryColorDark : Color = Color.gray + static let QuadiaryColorDark : Color = Color.yellow + + static let player1Dark : Color = Color.yellow.opacity(5) + static let player2Dark : Color = Color.red + + static let bgColorDark : Color = Color(hex: "222831") + static let fontColorDark : Color = Color(hex: "EEEEEE") + + */ +} diff --git a/DouShouQiIOS/DouShouQiIOS/Preview Content/Preview Assets/Contents.json b/DouShouQiIOS/DouShouQiIOS/Preview Content/Preview Assets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Preview Content/Preview Assets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/Struct/FullButtonStyle.swift b/DouShouQiIOS/DouShouQiIOS/Struct/FullButtonStyle.swift new file mode 100644 index 0000000..44a3d3c --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/Struct/FullButtonStyle.swift @@ -0,0 +1,20 @@ +// +// FullButtonStyle.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import Foundation +import SwiftUI + +struct FullButtonStyle: ButtonStyle { + func makeBody(configuration: Configuration) -> some View { + configuration.label + .padding(10) + .background(Color.yellow) + .foregroundStyle(.white) + .clipShape(Rectangle()) + .cornerRadius(15) + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/View/GameView.swift b/DouShouQiIOS/DouShouQiIOS/View/GameView.swift new file mode 100644 index 0000000..214f559 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/View/GameView.swift @@ -0,0 +1,115 @@ +// +// GameView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 22/05/2024. +// + +import SwiftUI +import SpriteKit + +struct GameView: View { + + @Environment(\.colorScheme) var colorScheme + + @State private var turnNumber = 1 + @State private var gameTime = 0.0 // Temps en secondes + @State private var statusMessage = "C'est votre tour" + @State private var player1Pieces = 8 + @State private var player2Pieces = 8 + + var timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() + + let gridItems = Array(repeating: GridItem(.flexible()), count: 8) + + ///SK + var gs : GameScene = GameScene(size: CGSizeMake(940,740)) + + + var body: some View { + ZStack{ + Rectangle().fill(Color.bgColor).edgesIgnoringSafeArea(.all) + VStack { + VStack { + Text(statusMessage) + .font(.title) + .padding(.top, 20) + + HStack { + ClassicTextDisplay(text: "Tour: \(turnNumber)") + + Spacer() + + ClassicTextDisplay(text: "Temps: \(Int(gameTime))s").onReceive(timer) { _ in + gameTime += 1 + } + } + .padding([.leading, .trailing], 20) + } + + /* + + ///Old Grid Support + + LazyVGrid(columns: gridItems, spacing: 5) { + ForEach(0..<64) { index in + Rectangle() + .foregroundColor((index / 8 + index % 8) % 2 == 0 ? .orange : .gray.opacity(0.2)) + .frame(height: 35) + .cornerRadius(10) + } + } + .padding(10) + .background(Color.yellow) + .cornerRadius(15) + .padding(20) + + */ + SpriteView(scene: gs) + .frame(width: 350, height: 275) + .padding(10) + .background(Color.primaryColor) + .cornerRadius(15) + .padding(20) + + + HStack { + VStack { + Text("Pièces Joueur 1") + .font(.headline) + .padding(.bottom, 5) + + Text("\(player1Pieces)") + .font(.largeTitle) + .padding() + .background(Color.player1.opacity(colorScheme == .dark ? 0.5 : 0.2)) + .cornerRadius(10) + } + .padding(20) + + Spacer() + + VStack { + Text("Pièces Joueur 2") + .font(.headline) + .padding(.bottom, 5) + + Text("\(player2Pieces)") + .font(.largeTitle) + .padding() + .background(Color.player2.opacity(colorScheme == .dark ? 0.5 : 0.2)) + .cornerRadius(10) + } + .padding(20) + } + } + .navigationBarTitle("DouShouQi", displayMode: .inline) + } + } +} + +struct GameView_Previews: PreviewProvider { + static var previews: some View { + GameView() + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/View/HistoryView.swift b/DouShouQiIOS/DouShouQiIOS/View/HistoryView.swift new file mode 100644 index 0000000..d47254b --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/View/HistoryView.swift @@ -0,0 +1,82 @@ +// +// HistoryView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 21/05/2024. +// + +import SwiftUI + + +struct HistoryView: View { + var playerName: String + var matches: [Match] // Modèle des parties du joueur + + var body: some View { + + VStack{ + Text("Historique du joueur").font(.largeTitle) + + HStack{ + Spacer() + DoubleTextDisplay(textL: "Ratio", textR: "0,3") + Spacer() + DoubleTextDisplay(textL: "Total", textR: "3") + Spacer() + } + + + List(matches) { match in + HStack { + Image(match.gameEndScreen) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 50, height: 50) + .cornerRadius(8) + + VStack(alignment: .leading) { + Text(match.opponent) + .font(.headline) + Text("Score: \(match.score)") + .font(.subheadline) + } + .padding(.leading, 10) + + Spacer() + + Text(match.result) + .foregroundColor(match.result == "Victoire" ? .green : .red) + .padding(.trailing, 10) + }.listRowBackground(Color.yellow.opacity(0.1)) + .padding() + .background(match.result == "Victoire" ? Color.green.opacity(0.3) : Color.red.opacity(0.3)) + .cornerRadius(10) + + + + } + .padding() + .navigationTitle("Historique de \(playerName)") + + }.background(Color.gray.opacity(0.1)) + } +} + +struct Match: Identifiable { + var id = UUID() + var gameEndScreen: String + var opponent: String + var score: String + var result: String +} + +struct HistoryView_Previews: PreviewProvider { + static var previews: some View { + let sampleMatches = [ + Match(gameEndScreen: "DouShouQi", opponent: "Opponent 1", score: "3-0", result: "Victoire"), + Match(gameEndScreen: "DouShouQi", opponent: "Opponent 2", score: "0-3", result: "Défaite"), + Match(gameEndScreen: "DouShouQi", opponent: "Opponent 3", score: "2-2", result: "Nul") + ] + HistoryView(playerName: "bro", matches: sampleMatches) + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/View/MainMenuView.swift b/DouShouQiIOS/DouShouQiIOS/View/MainMenuView.swift new file mode 100644 index 0000000..e5b0878 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/View/MainMenuView.swift @@ -0,0 +1,61 @@ +// +// MainMenuView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 21/05/2024. +// + +import SwiftUI + +struct MainMenuView: View { + @Environment(\.colorScheme) var colorScheme + + var body: some View { + NavigationStack { + + VStack { + Image("DouShouQi") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 200, height: 200) + + + Text("DouShouQi") + .font(.largeTitle) + .bold() + .padding() + + NavButton("Jouer Seul", destinationView: {GameView()}) + .padding(.top, 10) + + NavButton("Jouer en Multi", destinationView: {GameView()}) + + + NavButton("Leaderboard", destinationView: {PlayerListView()}) + .padding(.top, 20) + + Button(action: { + // Quitter + print("Quitter tapped!") + } + ) { + Text("Quitter") + .font(.title2) + .padding() + .foregroundColor(.yellow) + }.overlay( + RoundedRectangle(cornerRadius: 10) + .stroke(.yellow, lineWidth: 3) + ) + .padding(.top, 20) + + }.navigationBarBackButtonHidden(true) + } + } +} + +struct MainMenuView_Previews: PreviewProvider { + static var previews: some View { + MainMenuView() + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/View/PlayerListView.swift b/DouShouQiIOS/DouShouQiIOS/View/PlayerListView.swift new file mode 100644 index 0000000..8fff35e --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/View/PlayerListView.swift @@ -0,0 +1,50 @@ +// +// PlayerListView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import SwiftUI + +struct PlayerListView: View { + var body: some View { + NavigationStack { + ZStack { + //Rectangle().fill(Color.yellow) + VStack { + /*Text("Classement des joueurs") + .scaleEffect(1.75)*/ + + List { + NavigationLink("Billy", value: "Billy") + NavigationLink("Bob", value: "Bob") + NavigationLink("Bromingo", value: "Bromingo") + } + .background(Color.yellow) + .navigationDestination(for: String.self) { name in + PlayerView(name: name, age: 18, winLossRatio: 1.0, gamesPlayed: 10, wins: 5, losses: 5, histoMatches: [ + Match(gameEndScreen: "opponent1", opponent: "Opponent 1", score: "3-2", result: "Victoire"), + Match(gameEndScreen: "opponent2", opponent: "Opponent 2", score: "1-3", result: "Défaite"), + Match(gameEndScreen: "opponent3", opponent: "Opponent 3", score: "2-2", result: "Nul") + ]) //mettre player plus tard + } + .navigationTitle("Leaderboard") + } + .background(Color.yellow) + + VStack { + Spacer() + NavButton("Menu", destinationView: {MainMenuView()}, hideBackButton: true) + .padding(.bottom, 20) + } + } + } + } +} + +struct PlayerListView_Previews: PreviewProvider { + static var previews: some View { + PlayerListView() + } +} diff --git a/DouShouQiIOS/DouShouQiIOS/View/PlayerView.swift b/DouShouQiIOS/DouShouQiIOS/View/PlayerView.swift new file mode 100644 index 0000000..86c0733 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/View/PlayerView.swift @@ -0,0 +1,132 @@ +// +// PlayerView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import SwiftUI + +struct PlayerView: View { + //var Player : Player; + var name : String + var age: Int + var winLossRatio: Double + var gamesPlayed: Int + var wins: Int + var losses: Int + var histoMatches : [ Match ] + + var body: some View { + ZStack{ + /*Rectangle().fill(Color.orange.opacity(0.1))*/ + NavigationStack{ + VStack{ + Image("Blob") + .resizable() + .aspectRatio(contentMode: .fit) + .clipShape(Circle()) + .overlay(Circle().strokeBorder(Color.orange, lineWidth: 2)) + .scaleEffect(1) + .transformEffect(.identity) + + Spacer() + + VStack(alignment: .center){ + Text("\(name) Sname") + .font(.largeTitle) + .foregroundColor(Color.white) + + + Text("1") + .font(.title2) + .foregroundColor(Color.white) + .frame(width: 35, height: 35, alignment: .center) + .padding(5) + .overlay( + Circle() + .fill(Color.orange.opacity(0.3)) + ) + + }.frame(width: 200, height: 150) + + + + }.frame(maxWidth: .infinity) + .padding(20) + .background(Color.yellow) + .cornerRadius(50) + .shadow(color: .gray, radius: 3, x: 2, y: 2) + .padding(20) + + + Spacer() + + VStack{ + Text("Statistiques") + .fontWeight(.heavy) + .font(.largeTitle) + .foregroundColor(Color.yellow) + + Grid{ + GridRow{ + DoubleTextDisplay(textL: "Nombre de victoires", textR: "9") + } + + + GridRow{ + HStack{ + Text("Nombre de défaites").frame(width: 100, height: 50, alignment: .center) + Text("5") + } + } .frame(width: 150) + .background(Color.orange.opacity(0.3)) + .cornerRadius(15) + + GridRow{ + HStack{ + Text("Nombre de parties jouées").frame(width: 100, height: 50, alignment: .center) + Text("14") + } + } .frame(width: 150) + .background(Color.orange.opacity(0.3)) + .cornerRadius(15) + }.frame( + minWidth: 0, + maxWidth: .infinity, + alignment: .center + ) + Spacer() + + } + .foregroundStyle(.white) + .overlay( + RoundedRectangle(cornerRadius: 16) + .stroke(.yellow, lineWidth: 5) + ) + .padding(20) + + Spacer() + + NavButton("Historique", destinationView: {HistoryView(playerName: name, matches: histoMatches)}) + .padding(.top, 20) + } + } + + } +} + +struct PlayerView_Previews: PreviewProvider { + + static var previews: some View { + /*var player1 = new Player(Player(withName: "Meruemu", andSName: "Roi", andId: 2, andAge: 1)*/ + let stubedMatches = [ + Match(gameEndScreen: "opponent1", opponent: "Opponent 1", score: "3-2", result: "Victoire"), + Match(gameEndScreen: "opponent2", opponent: "Opponent 2", score: "1-3", result: "Défaite"), + Match(gameEndScreen: "opponent3", opponent: "Opponent 3", score: "2-2", result: "Nul") + ] + PlayerView(name: "bro", age: 18, winLossRatio: 1.0, gamesPlayed: 10, wins: 5, losses: 5, histoMatches : stubedMatches) + } +} + + diff --git a/DouShouQiIOS/DouShouQiIOS/View/SpriteKitView.swift b/DouShouQiIOS/DouShouQiIOS/View/SpriteKitView.swift new file mode 100644 index 0000000..af34be6 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOS/View/SpriteKitView.swift @@ -0,0 +1,27 @@ +// +// SpriteKitView.swift +// DouShouQiIOS +// +// Created by Pierre FERREIRA on 24/05/2024. +// + +import SwiftUI +import SpriteKit + +struct SpriteKitView: View { + ///Sprite Kit + var gs : GameScene = GameScene(size: CGSizeMake(940,740)) + + + var body: some View { + VStack{ + SpriteView(scene: gs) + } + } +} + +struct SpriteView_Previews: PreviewProvider { + static var previews: some View { + SpriteKitView() + } +} diff --git a/DouShouQiIOS/DouShouQiIOSTests/DouShouQiIOSTests.swift b/DouShouQiIOS/DouShouQiIOSTests/DouShouQiIOSTests.swift new file mode 100644 index 0000000..238e7ba --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOSTests/DouShouQiIOSTests.swift @@ -0,0 +1,36 @@ +// +// DouShouQiIOSTests.swift +// DouShouQiIOSTests +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import XCTest +@testable import DouShouQiIOS + +final class DouShouQiIOSTests: 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. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + 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/DouShouQiIOS/DouShouQiIOSUITests/DouShouQiIOSUITests.swift b/DouShouQiIOS/DouShouQiIOSUITests/DouShouQiIOSUITests.swift new file mode 100644 index 0000000..f771065 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOSUITests/DouShouQiIOSUITests.swift @@ -0,0 +1,41 @@ +// +// DouShouQiIOSUITests.swift +// DouShouQiIOSUITests +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import XCTest + +final class DouShouQiIOSUITests: 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 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/DouShouQiIOS/DouShouQiIOSUITests/DouShouQiIOSUITestsLaunchTests.swift b/DouShouQiIOS/DouShouQiIOSUITests/DouShouQiIOSUITestsLaunchTests.swift new file mode 100644 index 0000000..d0b6600 --- /dev/null +++ b/DouShouQiIOS/DouShouQiIOSUITests/DouShouQiIOSUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// DouShouQiIOSUITestsLaunchTests.swift +// DouShouQiIOSUITests +// +// Created by Pierre FERREIRA on 13/05/2024. +// + +import XCTest + +final class DouShouQiIOSUITestsLaunchTests: 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) + } +} diff --git a/IOSWorkSpace.xcworkspace/contents.xcworkspacedata b/IOSWorkSpace.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c23fb10 --- /dev/null +++ b/IOSWorkSpace.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/IOSWorkSpace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/IOSWorkSpace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/IOSWorkSpace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MyPlaygroundIOS.playground/Contents.swift b/MyPlaygroundIOS.playground/Contents.swift new file mode 100644 index 0000000..8ae4e3e --- /dev/null +++ b/MyPlaygroundIOS.playground/Contents.swift @@ -0,0 +1,24 @@ +import Cocoa + +var greeting = "Hello, playground" + +print(greeting) + + +var posx : Float = 140.0 +var posy : Float = 290.0 + +type(of: posx) +type(of: 100) + +var calc = posx/100.0 +type(of: calc) +calc.round(.toNearestOrAwayFromZero) + +var calc2 = posy/100.0 +type(of: calc2) +calc2.round(.toNearestOrAwayFromZero) + + +print("newpos : \(calc*100)") +print("newpos : \(calc2*100)") diff --git a/MyPlaygroundIOS.playground/contents.xcplayground b/MyPlaygroundIOS.playground/contents.xcplayground new file mode 100644 index 0000000..1c968e7 --- /dev/null +++ b/MyPlaygroundIOS.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..217ef24 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# SwiftUiTp +