diff --git a/iOS/app/MMMemory.xcodeproj/project.pbxproj b/iOS/app/MMMemory.xcodeproj/project.pbxproj index 46589d3..1ac7e20 100644 --- a/iOS/app/MMMemory.xcodeproj/project.pbxproj +++ b/iOS/app/MMMemory.xcodeproj/project.pbxproj @@ -8,11 +8,12 @@ /* Begin PBXBuildFile section */ 1F083A14C69F20A6BA92A63E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16A7DD61EF6CD4FB4E3DE25 /* AppDelegate.swift */; }; + 248FA3B7A82DA60E6892F821 /* memorySpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 490862345F009401FB4E1199 /* memorySpace.swift */; }; 3D03666F3BC2B1F2CBB49530 /* Main.SectionSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5F2B2E3A26F03F6825608E /* Main.SectionSelection.swift */; }; 3EA747EF132EF00B60CE3BA8 /* memorySide.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17E6ABD013AB08F7DF11C069 /* memorySide.swift */; }; 79FB208C9DADDA6179E588C3 /* Main.SectionGrid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AC22F19366076CF4168BFBD /* Main.SectionGrid.swift */; }; + 7B6D5211C387213AE05C080F /* memoryGap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9994AEAC20F4AB2DA70C9840 /* memoryGap.swift */; }; 89086E3972F560A9A1A76CE4 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C71EDBDFFDBC96F6E8E7762 /* Model.swift */; }; - A8118182ABE97FA935A1A4F9 /* model.iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3A95F2FA5C43AF82C7A97FC /* model.iOS.swift */; }; B19B3998FA2BA651ACB1E53C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C1742EFC5A1E818780679340 /* Assets.xcassets */; }; CAFD870CA84084E45011CC23 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4E32B0495E4BCEA4EE0508D4 /* LaunchScreen.storyboard */; }; D505E64F4CD6EAEB530BF851 /* Main.Section16Buttons.swift in Sources */ = {isa = PBXBuildFile; fileRef = A38A1AA6B57483F6B44CDF78 /* Main.Section16Buttons.swift */; }; @@ -23,15 +24,16 @@ /* Begin PBXFileReference section */ 0DF762100A8EDF105B6E136D /* Main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.swift; sourceTree = ""; }; 17E6ABD013AB08F7DF11C069 /* memorySide.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = memorySide.swift; sourceTree = ""; }; + 490862345F009401FB4E1199 /* memorySpace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = memorySpace.swift; sourceTree = ""; }; 4E32B0495E4BCEA4EE0508D4 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 6D5F2B2E3A26F03F6825608E /* Main.SectionSelection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.SectionSelection.swift; sourceTree = ""; }; + 9994AEAC20F4AB2DA70C9840 /* memoryGap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = memoryGap.swift; sourceTree = ""; }; 9AC22F19366076CF4168BFBD /* Main.SectionGrid.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.SectionGrid.swift; sourceTree = ""; }; 9C71EDBDFFDBC96F6E8E7762 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; 9D774FEE86833E8A0A74387C /* App.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; }; A355A898E25602F45B88CCBA /* Main.Platform.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.Platform.swift; sourceTree = ""; }; A38A1AA6B57483F6B44CDF78 /* Main.Section16Buttons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.Section16Buttons.swift; sourceTree = ""; }; C1742EFC5A1E818780679340 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - E3A95F2FA5C43AF82C7A97FC /* model.iOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = model.iOS.swift; sourceTree = ""; }; F16A7DD61EF6CD4FB4E3DE25 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -39,21 +41,14 @@ 44681273C081F5991624384F /* Swift */ = { isa = PBXGroup; children = ( + 9994AEAC20F4AB2DA70C9840 /* memoryGap.swift */, 17E6ABD013AB08F7DF11C069 /* memorySide.swift */, + 490862345F009401FB4E1199 /* memorySpace.swift */, ); name = Swift; path = ../../shared/Swift; sourceTree = ""; }; - 4F93BC5459F4AF4391816D4A /* shared */ = { - isa = PBXGroup; - children = ( - E3A95F2FA5C43AF82C7A97FC /* model.iOS.swift */, - ); - name = shared; - path = ../../shared; - sourceTree = ""; - }; 667BC26EA8068A9FA707FC02 /* src */ = { isa = PBXGroup; children = ( @@ -82,7 +77,6 @@ CD7F0F0C9CA1BA5EAFD5CA09 = { isa = PBXGroup; children = ( - 4F93BC5459F4AF4391816D4A /* shared */, 667BC26EA8068A9FA707FC02 /* src */, 44681273C081F5991624384F /* Swift */, AE7B74413EC292E802CC5C70 /* Products */, @@ -158,8 +152,9 @@ 3D03666F3BC2B1F2CBB49530 /* Main.SectionSelection.swift in Sources */, DB1010B8A246D47BEC6B3FA6 /* Main.swift in Sources */, 89086E3972F560A9A1A76CE4 /* Model.swift in Sources */, + 7B6D5211C387213AE05C080F /* memoryGap.swift in Sources */, 3EA747EF132EF00B60CE3BA8 /* memorySide.swift in Sources */, - A8118182ABE97FA935A1A4F9 /* model.iOS.swift in Sources */, + 248FA3B7A82DA60E6892F821 /* memorySpace.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate b/iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate index 26cfa31..181e615 100644 Binary files a/iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate and b/iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iOS/app/project.yml b/iOS/app/project.yml index 2948c0d..474936c 100644 --- a/iOS/app/project.yml +++ b/iOS/app/project.yml @@ -9,7 +9,6 @@ targets: sources: - path: "../src" - path: "../../shared/Swift" - - path: "../../shared/model.iOS.swift" settings: base: INFOPLIST_FILE: Info.plist diff --git a/shared/JavaScript/memoryGap.js b/shared/JavaScript/memoryGap.js new file mode 100644 index 0000000..118e2ab --- /dev/null +++ b/shared/JavaScript/memoryGap.js @@ -0,0 +1,4 @@ +// @ts-nocheck +function memoryGap() { + return memorySide() + memorySpace(); +} diff --git a/shared/JavaScript/memorySpace.js b/shared/JavaScript/memorySpace.js new file mode 100644 index 0000000..3a7d4de --- /dev/null +++ b/shared/JavaScript/memorySpace.js @@ -0,0 +1,3 @@ +function memorySpace() { + return 20; +} diff --git a/shared/model.iOS.swift b/shared/Swift/memoryGap.swift similarity index 60% rename from shared/model.iOS.swift rename to shared/Swift/memoryGap.swift index 86e4a9a..02e4932 100644 --- a/shared/model.iOS.swift +++ b/shared/Swift/memoryGap.swift @@ -1,7 +1,4 @@ -func memorySpace() -> Float { - return 20 -} - -func memoryGap() -> Float { - return memorySide() + memorySpace() -} +// @ts-nocheck +func memoryGap() -> Float { + return memorySide() + memorySpace() +} diff --git a/shared/Swift/memorySpace.swift b/shared/Swift/memorySpace.swift new file mode 100644 index 0000000..4134b41 --- /dev/null +++ b/shared/Swift/memorySpace.swift @@ -0,0 +1,3 @@ +func memorySpace() -> Float { + return 20 +} diff --git a/shared/gen b/shared/gen index b14439d..2dfb2e7 100755 --- a/shared/gen +++ b/shared/gen @@ -2,6 +2,14 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" ; pwd -P) -tsc $SCRIPT_DIR/memorySide.ts --outfile $SCRIPT_DIR/JavaScript/memorySide.js -$SCRIPT_DIR/../toSwift $SCRIPT_DIR/memorySide.ts $SCRIPT_DIR/Swift/memorySide.swift +FILES=( + memoryGap + memorySide + memorySpace +) + +for file in ${FILES[*]}; do + tsc $SCRIPT_DIR/$file.ts --outfile $SCRIPT_DIR/JavaScript/$file.js + $SCRIPT_DIR/../toSwift $SCRIPT_DIR/$file.ts $SCRIPT_DIR/Swift/$file.swift +done diff --git a/shared/memoryGap.ts b/shared/memoryGap.ts new file mode 100644 index 0000000..fb7dda4 --- /dev/null +++ b/shared/memoryGap.ts @@ -0,0 +1,4 @@ +// @ts-nocheck +function memoryGap(): number { + return memorySide() + memorySpace() +} diff --git a/shared/memorySpace.ts b/shared/memorySpace.ts new file mode 100644 index 0000000..b55e57b --- /dev/null +++ b/shared/memorySpace.ts @@ -0,0 +1,3 @@ +function memorySpace(): number { + return 20 +} diff --git a/shared/model.web.js b/shared/model.web.js deleted file mode 100644 index 3a6211d..0000000 --- a/shared/model.web.js +++ /dev/null @@ -1,7 +0,0 @@ -function memorySpace() { - return 20 -} - -function memoryGap() { - return memorySide() + memorySpace() -} diff --git a/web/memory.html b/web/memory.html index fc57ace..a8def0a 100644 --- a/web/memory.html +++ b/web/memory.html @@ -5,8 +5,9 @@ + - +