Compare commits
22 Commits
master
...
Api_Game_E
Author | SHA1 | Date |
---|---|---|
|
1ea49a0781 | 2 years ago |
|
a67b5b2ba6 | 2 years ago |
|
a168b375c1 | 2 years ago |
|
83d01a27b9 | 2 years ago |
|
f47e34d4e1 | 2 years ago |
|
b70d0c81e9 | 2 years ago |
|
2ce1ad47a1 | 2 years ago |
|
b9085b3e40 | 2 years ago |
|
6645d97ad7 | 2 years ago |
|
f003c8770c | 2 years ago |
|
1573c81cd4 | 2 years ago |
|
563dfe98d5 | 2 years ago |
|
e1c6895a69 | 2 years ago |
|
0c2b386056 | 2 years ago |
|
dfb8bc70bc | 2 years ago |
|
7ffadcb29c | 2 years ago |
|
bcd6335175 | 2 years ago |
|
65804fb524 | 2 years ago |
|
59efe2c595 | 2 years ago |
|
bc08312ea3 | 2 years ago |
|
887f507cba | 2 years ago |
|
88c52db3e2 | 2 years ago |
@ -0,0 +1,27 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="Dart SDK">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/async" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/core" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/html" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/io" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/math" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||||
|
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 462 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 215 KiB |
Before Width: | Height: | Size: 5.9 MiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 275 KiB |
Before Width: | Height: | Size: 198 KiB |
Before Width: | Height: | Size: 688 KiB |
@ -1,32 +0,0 @@
|
|||||||
package org.acme.Api.controllers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.enterprise.context.ApplicationScoped;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import javax.ws.rs.Consumes;
|
|
||||||
import javax.ws.rs.DELETE;
|
|
||||||
import javax.ws.rs.GET;
|
|
||||||
import javax.ws.rs.POST;
|
|
||||||
import javax.ws.rs.PUT;
|
|
||||||
import javax.ws.rs.Path;
|
|
||||||
import javax.ws.rs.PathParam;
|
|
||||||
import javax.ws.rs.Produces;
|
|
||||||
import javax.ws.rs.core.MediaType;
|
|
||||||
import javax.ws.rs.core.Response;
|
|
||||||
import javax.ws.rs.core.Response.Status;
|
|
||||||
|
|
||||||
import io.smallrye.mutiny.Uni;
|
|
||||||
|
|
||||||
@ApplicationScoped
|
|
||||||
@Path("/test")
|
|
||||||
public class TestController {
|
|
||||||
|
|
||||||
@GET
|
|
||||||
@Produces(MediaType.TEXT_PLAIN)
|
|
||||||
@Path("/po")
|
|
||||||
public String hello() {
|
|
||||||
return "Hello from RESTEasy Reactive";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Before Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 2.1 KiB |
@ -1,483 +1,483 @@
|
|||||||
// !$*UTF8*$!
|
// !$*UTF8*$!
|
||||||
{
|
{
|
||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 54;
|
objectVersion = 54;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||||
isa = PBXCopyFilesBuildPhase;
|
isa = PBXCopyFilesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
dstPath = "";
|
dstPath = "";
|
||||||
dstSubfolderSpec = 10;
|
dstSubfolderSpec = 10;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
name = "Embed Frameworks";
|
name = "Embed Frameworks";
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||||
);
|
);
|
||||||
name = Flutter;
|
name = Flutter;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
97C146E51CF9000F007C117D = {
|
97C146E51CF9000F007C117D = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
9740EEB11CF90186004384FC /* Flutter */,
|
9740EEB11CF90186004384FC /* Flutter */,
|
||||||
97C146F01CF9000F007C117D /* Runner */,
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
97C146EF1CF9000F007C117D /* Products */ = {
|
97C146EF1CF9000F007C117D /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
97C147021CF9000F007C117D /* Info.plist */,
|
97C147021CF9000F007C117D /* Info.plist */,
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||||
);
|
);
|
||||||
path = Runner;
|
path = Runner;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
97C146EC1CF9000F007C117D /* Resources */,
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = Runner;
|
name = Runner;
|
||||||
productName = Runner;
|
productName = Runner;
|
||||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
/* Begin PBXProject section */
|
||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1300;
|
LastUpgradeCheck = 1300;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
LastSwiftMigration = 1100;
|
LastSwiftMigration = 1100;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||||
compatibilityVersion = "Xcode 9.3";
|
compatibilityVersion = "Xcode 9.3";
|
||||||
developmentRegion = en;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
Base,
|
Base,
|
||||||
);
|
);
|
||||||
mainGroup = 97C146E51CF9000F007C117D;
|
mainGroup = 97C146E51CF9000F007C117D;
|
||||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
97C146ED1CF9000F007C117D /* Runner */,
|
97C146ED1CF9000F007C117D /* Runner */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
);
|
);
|
||||||
name = "Thin Binary";
|
name = "Thin Binary";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
};
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
);
|
);
|
||||||
name = "Run Script";
|
name = "Run Script";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
/* Begin PBXVariantGroup section */
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
97C146FB1CF9000F007C117D /* Base */,
|
97C146FB1CF9000F007C117D /* Base */,
|
||||||
);
|
);
|
||||||
name = Main.storyboard;
|
name = Main.storyboard;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
97C147001CF9000F007C117D /* Base */,
|
97C147001CF9000F007C117D /* Base */,
|
||||||
);
|
);
|
||||||
name = LaunchScreen.storyboard;
|
name = LaunchScreen.storyboard;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
/* End PBXVariantGroup section */
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
};
|
};
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.bowlinProject;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.bowlinProject;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
};
|
};
|
||||||
97C147031CF9000F007C117D /* Debug */ = {
|
97C147031CF9000F007C117D /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
);
|
);
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
97C147041CF9000F007C117D /* Release */ = {
|
97C147041CF9000F007C117D /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
97C147061CF9000F007C117D /* Debug */ = {
|
97C147061CF9000F007C117D /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.bowlinProject;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.bowlinProject;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
97C147071CF9000F007C117D /* Release */ = {
|
97C147071CF9000F007C117D /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.bowlinProject;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.bowlinProject;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
97C147031CF9000F007C117D /* Debug */,
|
97C147031CF9000F007C117D /* Debug */,
|
||||||
97C147041CF9000F007C117D /* Release */,
|
97C147041CF9000F007C117D /* Release */,
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||||
);
|
);
|
||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
97C147061CF9000F007C117D /* Debug */,
|
97C147061CF9000F007C117D /* Debug */,
|
||||||
97C147071CF9000F007C117D /* Release */,
|
97C147071CF9000F007C117D /* Release */,
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||||
);
|
);
|
||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
};
|
};
|
||||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 543 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 704 B |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 1.4 KiB |
@ -1,10 +0,0 @@
|
|||||||
class GameFields {
|
|
||||||
static final List<String> values = [
|
|
||||||
id, date, pointsCurrentUser, userId
|
|
||||||
];
|
|
||||||
|
|
||||||
static final String id = '_id';
|
|
||||||
static final String date = '_date';
|
|
||||||
static final String pointsCurrentUser = '_points_current_user';
|
|
||||||
static final String userId = '_user_id';
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
class GameDetailFields {
|
|
||||||
static final List<String> values = [
|
|
||||||
id, date, nameWinner, host
|
|
||||||
];
|
|
||||||
|
|
||||||
static final String id = '_id';
|
|
||||||
static final String date = '_date';
|
|
||||||
static final String nameWinner = '_winner_id';
|
|
||||||
static final String host = '_host';
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
class GameFields {
|
|
||||||
static final List<String> values = [
|
|
||||||
id, date, pointsCurrentUser, userId
|
|
||||||
];
|
|
||||||
|
|
||||||
static final String id = '_id';
|
|
||||||
static final String date = '_date';
|
|
||||||
static final String pointsCurrentUser = '_points_current_user';
|
|
||||||
static final String userId = '_user_id';
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
class PlayerFields {
|
|
||||||
static final List<String> values = [
|
|
||||||
idGame, name, image
|
|
||||||
];
|
|
||||||
|
|
||||||
static final String idGame = '_idGame';
|
|
||||||
static final String name = '_name';
|
|
||||||
static final String image = '_image';
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
class StatFields {
|
|
||||||
static final List<String> values = [
|
|
||||||
idUser, nbVictory, nbGames, highscore, nbStrikes, nbSpares, nbScore, avgScore, avgPinsPerRound
|
|
||||||
];
|
|
||||||
|
|
||||||
static final String nbVictory = '_nbVictory';
|
|
||||||
static final String nbGames = '_nbGames';
|
|
||||||
static final String highscore = '_highscore';
|
|
||||||
static final String nbStrikes = '_nbStrikes';
|
|
||||||
static final String nbSpares = '_nbSpares';
|
|
||||||
static final String nbScore = '_nbScore';
|
|
||||||
static final String avgScore = '_avgScore';
|
|
||||||
static final String avgPinsPerRound = '_avgPinsPerRound';
|
|
||||||
static final String idUser = '_idUser';
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
class UserFields {
|
|
||||||
static final List<String> values = [
|
|
||||||
id, name, image, mail
|
|
||||||
];
|
|
||||||
|
|
||||||
static final String id = '_id';
|
|
||||||
static final String name = '_name';
|
|
||||||
static final String image = '_image';
|
|
||||||
static final String mail = '_mail';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
import 'package:bowl_in/model/GameDetail.dart';
|
|
||||||
|
|
||||||
import '../../model/Player.dart';
|
|
||||||
import '../fields/GameDetailFields.dart';
|
|
||||||
|
|
||||||
class GameDetailMapper {
|
|
||||||
static Map<String, dynamic> toJson(GameDetail gameDetail) {
|
|
||||||
return {
|
|
||||||
GameDetailFields.id: gameDetail.id,
|
|
||||||
GameDetailFields.date: gameDetail.time.toIso8601String(),
|
|
||||||
GameDetailFields.nameWinner: gameDetail.winner?.name,
|
|
||||||
GameDetailFields.host: gameDetail.host
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static GameDetail toModel(
|
|
||||||
Map<String, dynamic> json, Player? winner, List<Player> players) {
|
|
||||||
String dateString = json[GameDetailFields.date];
|
|
||||||
return GameDetail(
|
|
||||||
json[GameDetailFields.id],
|
|
||||||
DateTime.parse(dateString),
|
|
||||||
winner,
|
|
||||||
json[GameDetailFields.host],
|
|
||||||
players);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
import 'package:bowl_in/model/Game.dart';
|
|
||||||
import '../../model/Player.dart';
|
|
||||||
import '../../model/User.dart';
|
|
||||||
import '../fields/GameFields.dart';
|
|
||||||
|
|
||||||
class GameMapper {
|
|
||||||
static Map<String, dynamic> toJson(Game game, User user) {
|
|
||||||
return {
|
|
||||||
GameFields.id: game.id,
|
|
||||||
GameFields.date: game.date.toIso8601String(),
|
|
||||||
GameFields.pointsCurrentUser: game.pointsCurrentUser,
|
|
||||||
GameFields.userId: user.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static Game toModel(Map<String, dynamic> json, List<Player> players) {
|
|
||||||
return Game(
|
|
||||||
json[GameFields.id],
|
|
||||||
DateTime.parse(json[GameFields.date]),
|
|
||||||
json[GameFields.pointsCurrentUser],
|
|
||||||
players
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
import 'package:bowl_in/database/fields/PlayerFields.dart';
|
|
||||||
|
|
||||||
import '../../model/Game.dart';
|
|
||||||
import '../../model/Player.dart';
|
|
||||||
|
|
||||||
class PlayerMapper {
|
|
||||||
static Map<String, dynamic> toJson(Player player, Game game) {
|
|
||||||
return {
|
|
||||||
PlayerFields.idGame: game.id,
|
|
||||||
PlayerFields.name: player.name,
|
|
||||||
PlayerFields.image: player.image,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static Player toModel(Map<String, dynamic> json) {
|
|
||||||
return Player(
|
|
||||||
json[PlayerFields.name],
|
|
||||||
json[PlayerFields.image]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
import 'package:bowl_in/database/fields/StatFields.dart';
|
|
||||||
import '../../model/Stat.dart';
|
|
||||||
import '../../model/User.dart';
|
|
||||||
|
|
||||||
class StatMapper {
|
|
||||||
static Map<String, dynamic> toJson(Stat stat, User user) {
|
|
||||||
return {
|
|
||||||
StatFields.idUser: user.id,
|
|
||||||
StatFields.nbVictory: stat.nbVictory,
|
|
||||||
StatFields.nbGames: stat.nbGames,
|
|
||||||
StatFields.highscore: stat.highscore,
|
|
||||||
StatFields.nbStrikes: stat.nbStrikes,
|
|
||||||
StatFields.nbSpares: stat.nbSpares,
|
|
||||||
StatFields.nbScore: stat.nbScore,
|
|
||||||
StatFields.avgScore: stat.avgScore,
|
|
||||||
StatFields.avgPinsPerRound: stat.avgPinsPerRound
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static Stat toModel(Map<String, dynamic> json) {
|
|
||||||
return Stat(
|
|
||||||
json[StatFields.nbVictory],
|
|
||||||
json[StatFields.nbGames],
|
|
||||||
json[StatFields.highscore],
|
|
||||||
json[StatFields.nbStrikes],
|
|
||||||
json[StatFields.nbSpares],
|
|
||||||
json[StatFields.nbScore],
|
|
||||||
json[StatFields.avgScore],
|
|
||||||
json[StatFields.avgPinsPerRound]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
import '../../model/Stat.dart';
|
|
||||||
import '../../model/User.dart';
|
|
||||||
import '../fields/UserFields.dart';
|
|
||||||
|
|
||||||
class UserMapper {
|
|
||||||
static Map<String, dynamic> toJson(User user) {
|
|
||||||
return {
|
|
||||||
UserFields.id: user.id,
|
|
||||||
UserFields.name: user.name,
|
|
||||||
UserFields.image: user.image,
|
|
||||||
UserFields.mail: user.mail,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static User toModel(Map<String, dynamic> json, Stat stat) {
|
|
||||||
return User.withStat(
|
|
||||||
json[UserFields.id],
|
|
||||||
json[UserFields.name],
|
|
||||||
json[UserFields.image],
|
|
||||||
json[UserFields.mail],
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
stat
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,336 +0,0 @@
|
|||||||
import 'package:bowl_in/database/fields/PlayerFields.dart';
|
|
||||||
import 'package:bowl_in/database/mappers/GameMapper.dart';
|
|
||||||
import 'package:bowl_in/database/mappers/PlayerMapper.dart';
|
|
||||||
import 'package:bowl_in/database/mappers/StatMapper.dart';
|
|
||||||
import 'package:bowl_in/model/Game.dart';
|
|
||||||
import 'package:bowl_in/model/GameDetail.dart';
|
|
||||||
import 'package:bowl_in/model/User.dart';
|
|
||||||
import 'package:path/path.dart';
|
|
||||||
import 'package:sqflite/sqflite.dart';
|
|
||||||
|
|
||||||
import '../../model/Player.dart';
|
|
||||||
import '../../model/Stat.dart';
|
|
||||||
import '../fields/GameDetailFields.dart';
|
|
||||||
import '../fields/GameFields.dart';
|
|
||||||
import '../fields/StatFields.dart';
|
|
||||||
import '../fields/UserFields.dart';
|
|
||||||
import '../mappers/GameDetailMapper.dart';
|
|
||||||
import '../mappers/UserMapper.dart';
|
|
||||||
|
|
||||||
class BowlInDatabase {
|
|
||||||
BowlInDatabase();
|
|
||||||
|
|
||||||
static final BowlInDatabase instance = BowlInDatabase._init();
|
|
||||||
|
|
||||||
static Database? _database;
|
|
||||||
|
|
||||||
BowlInDatabase._init();
|
|
||||||
|
|
||||||
static const String tableUser = 'users';
|
|
||||||
static const String tableGame = 'games';
|
|
||||||
static const String tableGameDetail = 'gameDetails';
|
|
||||||
static const String tableStat = 'stats';
|
|
||||||
static const String tablePlayer = 'players';
|
|
||||||
|
|
||||||
Future<Database> get database async {
|
|
||||||
if (_database != null) return _database!;
|
|
||||||
|
|
||||||
_database = await _initDB('user.db');
|
|
||||||
return _database!;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Database> _initDB(String filePath) async {
|
|
||||||
final dbPath = await getDatabasesPath();
|
|
||||||
final path = join(dbPath, filePath);
|
|
||||||
|
|
||||||
return await openDatabase(path,
|
|
||||||
version: 6, onCreate: _createDB, onUpgrade: _upgradeDB);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future _createDB(Database db, int version) async {
|
|
||||||
const idType = 'INTEGER PRIMARY KEY AUTOINCREMENT';
|
|
||||||
const textType = 'TEXT NOT NULL';
|
|
||||||
const boolType = 'BOOLEAN NOT NULL';
|
|
||||||
const integerType = 'INTEGER NOT NULL';
|
|
||||||
const realType = 'REAL NOT NULL';
|
|
||||||
|
|
||||||
await db.execute('''
|
|
||||||
CREATE TABLE $tableUser (
|
|
||||||
${UserFields.id} $idType,
|
|
||||||
${UserFields.name} $boolType,
|
|
||||||
${UserFields.image} $textType,
|
|
||||||
${UserFields.mail} $textType
|
|
||||||
)
|
|
||||||
''');
|
|
||||||
|
|
||||||
await db.execute('''
|
|
||||||
CREATE TABLE $tableGame (
|
|
||||||
${GameFields.id} $idType,
|
|
||||||
${GameFields.date} $textType,
|
|
||||||
${GameFields.pointsCurrentUser} $integerType,
|
|
||||||
${GameFields.userId} $integerType,
|
|
||||||
FOREIGN KEY(${GameFields.userId}) REFERENCES $tableUser(${UserFields.id})
|
|
||||||
)
|
|
||||||
''');
|
|
||||||
|
|
||||||
await db.execute('''
|
|
||||||
CREATE TABLE $tableGameDetail (
|
|
||||||
${GameDetailFields.id} $idType,
|
|
||||||
${GameDetailFields.date} $textType,
|
|
||||||
${GameDetailFields.nameWinner} $textType,
|
|
||||||
${GameDetailFields.host} $integerType
|
|
||||||
)
|
|
||||||
''');
|
|
||||||
|
|
||||||
await db.execute('''
|
|
||||||
CREATE TABLE $tableStat (
|
|
||||||
${StatFields.idUser} $integerType,
|
|
||||||
${StatFields.nbVictory} $integerType,
|
|
||||||
${StatFields.nbGames} $integerType,
|
|
||||||
${StatFields.highscore} $integerType,
|
|
||||||
${StatFields.nbStrikes} $integerType,
|
|
||||||
${StatFields.nbSpares} $integerType,
|
|
||||||
${StatFields.nbScore} $integerType,
|
|
||||||
${StatFields.avgScore} $realType,
|
|
||||||
${StatFields.avgPinsPerRound} $realType,
|
|
||||||
FOREIGN KEY(${StatFields.idUser}) REFERENCES $tableUser(${UserFields.id})
|
|
||||||
)
|
|
||||||
''');
|
|
||||||
|
|
||||||
await db.execute('''
|
|
||||||
CREATE TABLE $tablePlayer (
|
|
||||||
id $idType,
|
|
||||||
${PlayerFields.name} $textType,
|
|
||||||
${PlayerFields.image} $textType,
|
|
||||||
${PlayerFields.idGame} $integerType,
|
|
||||||
FOREIGN KEY(${PlayerFields.idGame}) REFERENCES $tableGame(${GameFields.id})
|
|
||||||
)
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _upgradeDB(Database db, int oldVersion, int newVersion) async {
|
|
||||||
if (oldVersion < 6 ) {
|
|
||||||
await db.execute('DROP TABLE IF EXISTS $tableUser');
|
|
||||||
await db.execute('DROP TABLE IF EXISTS $tableGame');
|
|
||||||
await db.execute('DROP TABLE IF EXISTS $tableGameDetail');
|
|
||||||
await db.execute('DROP TABLE IF EXISTS $tableStat');
|
|
||||||
await db.execute('DROP TABLE IF EXISTS $tablePlayer');
|
|
||||||
await _createDB(db, newVersion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// User
|
|
||||||
|
|
||||||
Future<void> createUser(User user) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
await db.insert(tableUser, UserMapper.toJson(user));
|
|
||||||
await createStat(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<User?> readUser(int id) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
final result = await db
|
|
||||||
.query(tableUser, where: '${UserFields.id} = ?', whereArgs: [id]);
|
|
||||||
|
|
||||||
if (result.isNotEmpty) {
|
|
||||||
final stat = await readStat(id);
|
|
||||||
|
|
||||||
User user;
|
|
||||||
if (stat != null) {
|
|
||||||
user = UserMapper.toModel(result.first, stat);
|
|
||||||
} else {
|
|
||||||
user = UserMapper.toModel(result.first, Stat.empty());
|
|
||||||
}
|
|
||||||
final games = await readGame(id);
|
|
||||||
for (var game in games) {
|
|
||||||
user.games.add(game);
|
|
||||||
}
|
|
||||||
return user;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> updateUser(User user) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
await db.transaction((txn) async {
|
|
||||||
await txn.update(tableUser, UserMapper.toJson(user),
|
|
||||||
where: '${UserFields.id} = ?', whereArgs: [user.id]);
|
|
||||||
|
|
||||||
await txn.update(tableStat, StatMapper.toJson(user.stat, user),
|
|
||||||
where: '${StatFields.idUser} = ?', whereArgs: [user.id]);
|
|
||||||
|
|
||||||
// Insert new games for the user
|
|
||||||
for (var game in user.games) {
|
|
||||||
var result = await txn.query(tableGame,
|
|
||||||
where: '${GameFields.id} = ? AND ${GameFields.userId} = ?',
|
|
||||||
whereArgs: [game.id, user.id]);
|
|
||||||
if (result.isNotEmpty) {
|
|
||||||
await txn.update(tableGame, GameMapper.toJson(game, user),
|
|
||||||
where: '${GameFields.id} = ? AND ${GameFields.userId} = ?',
|
|
||||||
whereArgs: [game.id, user.id]);
|
|
||||||
} else {
|
|
||||||
await txn.insert(tableGame, GameMapper.toJson(game, user));
|
|
||||||
for (var player in game.players) {
|
|
||||||
await txn.insert(tablePlayer, PlayerMapper.toJson(player, game));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> deleteUser(int id) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
await deleteGame(id);
|
|
||||||
|
|
||||||
await deleteStat(id);
|
|
||||||
|
|
||||||
return await db.delete(
|
|
||||||
tableUser,
|
|
||||||
where: '${UserFields.id} = ?',
|
|
||||||
whereArgs: [id],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// GameDetail
|
|
||||||
|
|
||||||
Future<void> createGameDetail(GameDetail gameDetail) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
await db.transaction((txn) async {
|
|
||||||
await txn.insert(tableGameDetail, GameDetailMapper.toJson(gameDetail));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<List<GameDetail>> readGameDetail() async {
|
|
||||||
final db = await instance.database;
|
|
||||||
final result = await db.query(tableGameDetail);
|
|
||||||
|
|
||||||
if (result.isNotEmpty) {
|
|
||||||
List<GameDetail> gameDetails = [];
|
|
||||||
for (var gameDetail in result) {
|
|
||||||
List<Player> players = [];
|
|
||||||
Player? winner = null;
|
|
||||||
final resultPlayer = await db.query(tablePlayer,
|
|
||||||
where: '${PlayerFields.idGame} = ?',
|
|
||||||
whereArgs: [gameDetail[GameDetailFields.id]]);
|
|
||||||
for (var player in resultPlayer) {
|
|
||||||
var rPlayer = PlayerMapper.toModel(player);
|
|
||||||
players.add(rPlayer);
|
|
||||||
if (rPlayer.name == gameDetail[GameDetailFields.nameWinner]) {
|
|
||||||
winner = rPlayer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gameDetails.add(GameDetailMapper.toModel(gameDetail, winner, players));
|
|
||||||
}
|
|
||||||
return gameDetails;
|
|
||||||
} else {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> deleteGameDetail() async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
return await db.delete(tableGameDetail);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Game
|
|
||||||
|
|
||||||
Future<void> createGame(User user) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
await db.transaction((txn) async {
|
|
||||||
for (var game in user.games) {
|
|
||||||
await txn.insert(tableGame, GameMapper.toJson(game, user));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<List<Game>> readGame(int id) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
final result = await db
|
|
||||||
.query(tableGame, where: '${GameFields.userId} = ?', whereArgs: [id]);
|
|
||||||
|
|
||||||
if (result.isNotEmpty) {
|
|
||||||
List<Game> games = [];
|
|
||||||
for (var game in result) {
|
|
||||||
List<Player> players = [];
|
|
||||||
final resultPlayer = await db.query(tablePlayer,
|
|
||||||
where: '${PlayerFields.idGame} = ?', whereArgs: [game[GameFields.id]]);
|
|
||||||
for (var player in resultPlayer) {
|
|
||||||
players.add(PlayerMapper.toModel(player));
|
|
||||||
}
|
|
||||||
games.add(GameMapper.toModel(game, players));
|
|
||||||
players = [];
|
|
||||||
}
|
|
||||||
return games;
|
|
||||||
} else {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> deleteGame(int id) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
return await db.transaction((txn) async {
|
|
||||||
await txn.delete(
|
|
||||||
tablePlayer,
|
|
||||||
where: '${PlayerFields.idGame} IN (SELECT ${GameFields.id} FROM $tableGame WHERE ${GameFields.userId} = ?)',
|
|
||||||
whereArgs: [id],
|
|
||||||
);
|
|
||||||
|
|
||||||
return await txn.delete(
|
|
||||||
tableGame,
|
|
||||||
where: '${GameFields.userId} = ?',
|
|
||||||
whereArgs: [id],
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stat
|
|
||||||
|
|
||||||
Future<void> createStat(User user) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
await db.insert(tableStat, StatMapper.toJson(Stat.empty(), user));
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Stat?> readStat(int id) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
final result = await db
|
|
||||||
.query(tableStat, where: '${StatFields.idUser} = ?', whereArgs: [id]);
|
|
||||||
|
|
||||||
if (result.isNotEmpty) {
|
|
||||||
Stat stat = StatMapper.toModel(result.first);
|
|
||||||
return stat;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> updateStat(User user) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
await db.transaction((txn) async {
|
|
||||||
await txn.update(tableStat, StatMapper.toJson(user.stat, user),
|
|
||||||
where: '${StatFields.idUser} = ?', whereArgs: [user.id]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> deleteStat(int id) async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
return await db.delete(
|
|
||||||
tableStat,
|
|
||||||
where: '${StatFields.idUser} = ?',
|
|
||||||
whereArgs: [id],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future close() async {
|
|
||||||
final db = await instance.database;
|
|
||||||
|
|
||||||
db.close();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,97 +0,0 @@
|
|||||||
import 'Player.dart';
|
|
||||||
|
|
||||||
final maxScoreInFrame = 30;
|
|
||||||
|
|
||||||
abstract class AbstractRound {
|
|
||||||
int? _firstThrow;
|
|
||||||
int? _secondThrow;
|
|
||||||
int? _points;
|
|
||||||
int _number;
|
|
||||||
Player _player;
|
|
||||||
|
|
||||||
AbstractRound? _previousRound;
|
|
||||||
|
|
||||||
// Constructor
|
|
||||||
AbstractRound(this._firstThrow, this._secondThrow, this._points, this._player, this._number);
|
|
||||||
|
|
||||||
// Getters and setters
|
|
||||||
int? get firstThrow => _firstThrow;
|
|
||||||
|
|
||||||
set firstThrow(int? value) {
|
|
||||||
_firstThrow = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
int? get secondThrow => _secondThrow;
|
|
||||||
|
|
||||||
set secondThrow(int? value) {
|
|
||||||
_secondThrow = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
int? get points => _points;
|
|
||||||
|
|
||||||
set points(int? value) {
|
|
||||||
if((value??0)>=maxScoreInFrame){
|
|
||||||
_points=maxScoreInFrame;
|
|
||||||
}else {
|
|
||||||
_points = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int get number => _number;
|
|
||||||
|
|
||||||
set number(int value) {
|
|
||||||
_number = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player get player => _player;
|
|
||||||
|
|
||||||
set player(Player value) {
|
|
||||||
_player = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
AbstractRound? get previousRound => _previousRound;
|
|
||||||
|
|
||||||
set previousRound(AbstractRound? value) {
|
|
||||||
_previousRound = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool computeNext(int val);
|
|
||||||
void computePoints();
|
|
||||||
bool shotIsStrike();
|
|
||||||
int getMaxPinsThisShot();
|
|
||||||
|
|
||||||
bool isStrike() {
|
|
||||||
return firstThrow==10;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isSpare(){
|
|
||||||
return firstThrow!=10 && (firstThrow ?? 0)+(secondThrow ?? 0)==10;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isSpareOrStrike() {
|
|
||||||
return (firstThrow ?? 0)+(secondThrow ?? 0)==10;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getNbStrike();
|
|
||||||
int getNbSpares();
|
|
||||||
int getPinsKnockedDown();
|
|
||||||
|
|
||||||
void subscribe(AbstractRound nextRound){
|
|
||||||
nextRound.previousRound=this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void update(int val){
|
|
||||||
print(" ROUND " + number.toString() + "UPDATE : " + val.toString());
|
|
||||||
|
|
||||||
points = (points ?? 0) + val;
|
|
||||||
previousRound?.update(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void unsubscribePreviousRound(){
|
|
||||||
print("UNSUBSCRIBE");
|
|
||||||
previousRound?.unsubscribePreviousRound();
|
|
||||||
previousRound=null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +1,43 @@
|
|||||||
import 'Player.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
class Game {
|
class Game {
|
||||||
final int _id;
|
Uuid _id;
|
||||||
final DateTime _date;
|
DateTime _time;
|
||||||
final int _pointsCurrentUser;
|
int _pointsCurrentUser;
|
||||||
final List<Player> _players;
|
bool _isFinished;
|
||||||
|
List<String> _playerImages = [];
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Game(this._id, this._date, this._pointsCurrentUser,
|
Game(this._id, this._time, this._pointsCurrentUser, this._isFinished, this._playerImages);
|
||||||
this._players);
|
|
||||||
|
// Getters and setters
|
||||||
|
Uuid get id => _id;
|
||||||
|
|
||||||
|
set id(Uuid value) {
|
||||||
|
_id = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime get time => _time;
|
||||||
|
|
||||||
|
set time(DateTime value) {
|
||||||
|
_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
int get id => _id;
|
|
||||||
DateTime get date => _date;
|
|
||||||
int get pointsCurrentUser => _pointsCurrentUser;
|
int get pointsCurrentUser => _pointsCurrentUser;
|
||||||
List<Player> get players => _players;
|
|
||||||
|
set pointsCurrentUser(int value) {
|
||||||
|
_pointsCurrentUser = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool get isFinished => _isFinished;
|
||||||
|
|
||||||
|
set isFinished(bool value) {
|
||||||
|
_isFinished = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> get playerImages => _playerImages;
|
||||||
|
|
||||||
|
set playerImages(List<String> value) {
|
||||||
|
_playerImages = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,82 +1,82 @@
|
|||||||
import 'package:bowl_in/model/AbstractRound.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
import 'package:bowl_in/model/Game.dart';
|
|
||||||
import 'package:bowl_in/model/LastRound.dart';
|
|
||||||
import 'Player.dart';
|
import 'Player.dart';
|
||||||
import 'Round.dart';
|
import 'Round.dart';
|
||||||
import 'User.dart';
|
|
||||||
|
|
||||||
class GameDetail {
|
class GameDetail {
|
||||||
int _id;
|
Uuid _id;
|
||||||
final DateTime _time;
|
DateTime _time;
|
||||||
Player? _winner;
|
Uuid _winner;
|
||||||
final int _host;
|
int _nbPoints;
|
||||||
final List<AbstractRound> _rounds = [];
|
bool _isFinished;
|
||||||
final List<Player> _players;
|
Round _currentRound;
|
||||||
final Map<Player, int> _points = {};
|
Player _host;
|
||||||
|
List<Round> _rounds = [];
|
||||||
|
List<Player> _players = [];
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
GameDetail(this._id, this._time, this._winner, this._host, this._players) {
|
GameDetail(
|
||||||
for (int i = 1; i <= 9; i++) {
|
this._id,
|
||||||
players.forEach((element) {
|
this._time,
|
||||||
this.rounds.add(Round(null, null, 0, element, i));
|
this._winner,
|
||||||
});
|
this._nbPoints,
|
||||||
}
|
this._isFinished,
|
||||||
players.forEach((element) {
|
this._currentRound,
|
||||||
this.rounds.add(LastRound(null, null, 0, element, 10, null));
|
this._host,
|
||||||
});
|
this._rounds,
|
||||||
}
|
this._players);
|
||||||
|
|
||||||
// Getters and setters
|
// Getters and setters
|
||||||
int get id => _id;
|
Uuid get id => _id;
|
||||||
|
|
||||||
set id(int value) {
|
set id(Uuid value) {
|
||||||
_id = value;
|
_id = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTime get time => _time;
|
DateTime get time => _time;
|
||||||
|
|
||||||
Player? get winner => _winner;
|
set time(DateTime value) {
|
||||||
|
_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uuid get winner => _winner;
|
||||||
|
|
||||||
set winner(Player? value) {
|
set winner(Uuid value) {
|
||||||
_winner = value;
|
_winner = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get host => _host;
|
int get nbPoints => _nbPoints;
|
||||||
|
|
||||||
List<AbstractRound> get rounds => _rounds;
|
set nbPoints(int value) {
|
||||||
|
_nbPoints = value;
|
||||||
|
}
|
||||||
|
|
||||||
List<Player> get players => _players;
|
bool get isFinished => _isFinished;
|
||||||
|
|
||||||
Map<Player, int> get points => _points;
|
set isFinished(bool value) {
|
||||||
|
_isFinished = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Round get currentRound => _currentRound;
|
||||||
|
|
||||||
void addGameToUsers() {
|
set currentRound(Round value) {
|
||||||
for (var p in players) {
|
_currentRound = value;
|
||||||
if (p is User) {
|
|
||||||
p.games.add(Game(this.id, this.time, points[p] ?? 0, players));
|
|
||||||
p.stat.updateStats(this, p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void computeWinner() {
|
Player get host => _host;
|
||||||
print(getRank().entries.first.key.name);
|
|
||||||
this.winner = getRank().entries.first.key;
|
set host(Player value) {
|
||||||
|
_host = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void computeScores() {
|
List<Round> get rounds => _rounds;
|
||||||
print("====COMPUTE POINTS====");
|
|
||||||
for (var element in rounds) {
|
set rounds(List<Round> value) {
|
||||||
points[element.player] =
|
_rounds = value;
|
||||||
(points[element.player] ?? 0) + (element.points ?? 0);
|
|
||||||
print(element.points);
|
|
||||||
}
|
|
||||||
computeWinner();
|
|
||||||
addGameToUsers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Player, int> getRank() {
|
List<Player> get players => _players;
|
||||||
var sortedByValueMap = Map.fromEntries(points.entries.toList()
|
|
||||||
..sort((e1, e2) => e2.value.compareTo(e1.value)));
|
set players(List<Player> value) {
|
||||||
return sortedByValueMap;
|
_players = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
import 'package:bowl_in/model/AbstractRound.dart';
|
|
||||||
import 'package:bowl_in/model/IManager.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
import 'GameDetail.dart';
|
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
|
|
||||||
import 'Round.dart';
|
|
||||||
|
|
||||||
class GamePlayer {
|
|
||||||
late GameDetail _game;
|
|
||||||
final IManager _parent;
|
|
||||||
int currentRoundIndex = 0;
|
|
||||||
|
|
||||||
GamePlayer(this._parent);
|
|
||||||
|
|
||||||
GameDetail get game => _game;
|
|
||||||
|
|
||||||
set game(GameDetail value) {
|
|
||||||
currentRoundIndex = 0;
|
|
||||||
_game = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
AbstractRound? get currentRound {
|
|
||||||
if (currentRoundIndex < game.rounds.length){
|
|
||||||
return game.rounds[currentRoundIndex];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
void onNext(bool isRoundFinished, BuildContext? context) {
|
|
||||||
if (isRoundFinished) {
|
|
||||||
print("++");
|
|
||||||
currentRoundIndex++;
|
|
||||||
}
|
|
||||||
if (currentRoundIndex >= game.rounds.length) {
|
|
||||||
print("FINISHED");
|
|
||||||
|
|
||||||
game.id=_parent.gameMgr.getNextId();
|
|
||||||
_parent.gameMgr.addGame(game);
|
|
||||||
|
|
||||||
game.computeScores();
|
|
||||||
_parent.userMgr.saveUser(_parent.userCurrent);
|
|
||||||
_parent.gameMgr.saveGame(_game);
|
|
||||||
context?.go("/scoreboard", extra: game);
|
|
||||||
} else {
|
|
||||||
print("IN GAME : " + currentRoundIndex.toString());
|
|
||||||
if (game.rounds[currentRoundIndex] is Round) {
|
|
||||||
print("ROUND");
|
|
||||||
} else {
|
|
||||||
print("LAST ROUND");
|
|
||||||
}
|
|
||||||
context?.pushReplacement("/in-game",
|
|
||||||
extra: game.rounds[currentRoundIndex]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void onSpareOrStrike() {
|
|
||||||
if (currentRoundIndex < game.rounds.length - game.players.length) {
|
|
||||||
print("ON SPAREORSTRIKE");
|
|
||||||
game.rounds[currentRoundIndex]
|
|
||||||
.subscribe(game.rounds[currentRoundIndex + game.players.length]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +1,8 @@
|
|||||||
import 'dart:math';
|
import 'package:uuid/uuid.dart';
|
||||||
|
import 'package:uuid/uuid_util.dart';
|
||||||
import 'Player.dart';
|
import 'Player.dart';
|
||||||
|
|
||||||
const _images = [
|
|
||||||
"./assets/images/image_user_cyan.png",
|
|
||||||
"./assets/images/image_user_red.png",
|
|
||||||
"./assets/images/image_user_yellow.png",
|
|
||||||
"./assets/images/image_user_pink.png",
|
|
||||||
"./assets/images/image_user_orange.png",
|
|
||||||
"./assets/images/image_user_green.png",
|
|
||||||
"./assets/images/image_user_purple.png",
|
|
||||||
];
|
|
||||||
|
|
||||||
class Guest extends Player {
|
class Guest extends Player {
|
||||||
// Constructor
|
// Constructor
|
||||||
Guest(String name) : super(name, _images[Random().nextInt(_images.length)]);
|
Guest(Uuid id, String image, String name) : super(id, image, name);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
abstract class IAuthManager {
|
abstract class IAuthManager {
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
bool verifiedUser(String mail, String password);
|
bool verifiedUser(String name, String password);
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
|
import 'package:uuid/uuid.dart';
|
||||||
|
import 'package:uuid/uuid_util.dart';
|
||||||
import 'GameDetail.dart';
|
import 'GameDetail.dart';
|
||||||
import 'Player.dart';
|
import 'Player.dart';
|
||||||
|
|
||||||
abstract class IGameManager {
|
abstract class IGameManager {
|
||||||
GameDetail getGameById(int id);
|
// Methods
|
||||||
saveGame(GameDetail gameDetail);
|
GameDetail getGameById(Uuid id);
|
||||||
List<GameDetail> getGamesByPlayerId(int id);
|
List<GameDetail> getGamesByPlayerId(Uuid id);
|
||||||
List<GameDetail> getGamesByPlayer(Player user);
|
List<GameDetail> getGamesByPlayer(Player user);
|
||||||
List<GameDetail> getGamesByPlayers(List<Player> users);
|
List<GameDetail> getGamesByPlayers(List<Player> users);
|
||||||
List<Player> getPlayersByIdGame(int id);
|
|
||||||
Map<Player, int> getRankByIdGame(int id);
|
|
||||||
int getNextId();
|
|
||||||
addGame(GameDetail gd);
|
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,21 @@
|
|||||||
import 'package:bowl_in/model/GameDetail.dart';
|
|
||||||
import 'package:bowl_in/model/GamePlayer.dart';
|
|
||||||
import 'User.dart';
|
import 'User.dart';
|
||||||
|
import 'Game.dart';
|
||||||
import 'IUserManager.dart';
|
import 'IUserManager.dart';
|
||||||
import 'IGameManager.dart';
|
import 'IGameManager.dart';
|
||||||
|
import 'Game.dart';
|
||||||
|
|
||||||
abstract class IManager {
|
abstract class IManager {
|
||||||
late User _userCurrent;
|
late User _userCurrent;
|
||||||
late GameDetail _gameCurrent;
|
late Game _gameCurrent;
|
||||||
late final GamePlayer _gamePlayer = GamePlayer(this);
|
IUserManager _userMgr;
|
||||||
late final IUserManager _userMgr;
|
IGameManager _gameMgr;
|
||||||
late final IGameManager _gameMgr;
|
|
||||||
|
// Constructor
|
||||||
// Getters and settersz
|
IManager(this._userCurrent, this._gameCurrent);
|
||||||
|
|
||||||
|
// Getters and setters
|
||||||
User get userCurrent => _userCurrent;
|
User get userCurrent => _userCurrent;
|
||||||
|
Game get gameCurrent => _gameCurrent;
|
||||||
set userCurrent(User user) {
|
|
||||||
_userCurrent = user;
|
|
||||||
}
|
|
||||||
|
|
||||||
GamePlayer get gamePlayer => _gamePlayer;
|
|
||||||
|
|
||||||
GameDetail get gameCurrent => _gameCurrent;
|
|
||||||
|
|
||||||
set gameCurrent(GameDetail value) {
|
|
||||||
_gameCurrent = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
IUserManager get userMgr => _userMgr;
|
IUserManager get userMgr => _userMgr;
|
||||||
|
|
||||||
IGameManager get gameMgr => _gameMgr;
|
IGameManager get gameMgr => _gameMgr;
|
||||||
|
|
||||||
set gameMgr(IGameManager value) {
|
|
||||||
_gameMgr = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set userMgr(IUserManager value) {
|
|
||||||
_userMgr = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
import 'Player.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
import 'User.dart';
|
import 'User.dart';
|
||||||
import 'IAuthManager.dart';
|
import 'IAuthManager.dart';
|
||||||
|
|
||||||
abstract class IUserManager {
|
abstract class IUserManager {
|
||||||
IAuthManager _authMgr;
|
IAuthManager _authMgr;
|
||||||
|
|
||||||
// Constructor
|
|
||||||
IUserManager(this._authMgr);
|
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
IAuthManager get authMgr => _authMgr;
|
IAuthManager get authMgr => _authMgr;
|
||||||
List<Player> getUsersByName(String name);
|
List<User> getUsersByName(String name);
|
||||||
Player getUserById(int id);
|
User getUserById(Uuid id);
|
||||||
saveUser(User user);
|
|
||||||
List<User> getRankingWithFriends();
|
|
||||||
}
|
}
|
||||||
|
@ -1,112 +0,0 @@
|
|||||||
import 'package:bowl_in/model/AbstractRound.dart';
|
|
||||||
|
|
||||||
class LastRound extends AbstractRound {
|
|
||||||
int? _thirdThrow;
|
|
||||||
|
|
||||||
LastRound(super.firstThrow, super.secondThrow, super.points, super.player,
|
|
||||||
super.number, this._thirdThrow);
|
|
||||||
|
|
||||||
int? get thirdThrow => _thirdThrow;
|
|
||||||
|
|
||||||
set thirdThrow(int? value) {
|
|
||||||
_thirdThrow = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool computeNext(int val) {
|
|
||||||
if (firstThrow == null) {
|
|
||||||
firstThrow = val;
|
|
||||||
if (previousRound?.isSpare() ?? false) {
|
|
||||||
previousRound?.update(val);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} else if (secondThrow == null) {
|
|
||||||
secondThrow = val;
|
|
||||||
if ((firstThrow ?? 0) + (secondThrow ?? 0) < 10) {
|
|
||||||
computePoints();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} else if ((firstThrow ?? 0) + (secondThrow ?? 0) >= 10) {
|
|
||||||
thirdThrow = val;
|
|
||||||
}
|
|
||||||
computePoints();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void computePoints() {
|
|
||||||
points = (firstThrow ?? 0) + (secondThrow ?? 0) + (thirdThrow ?? 0);
|
|
||||||
print("Compute points : " + points.toString());
|
|
||||||
|
|
||||||
if (previousRound?.isStrike() ?? false) {
|
|
||||||
update(points ?? 0);
|
|
||||||
}
|
|
||||||
unsubscribePreviousRound();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool shotIsStrike() {
|
|
||||||
if (firstThrow == null) {
|
|
||||||
return true;
|
|
||||||
} else if (secondThrow == null) {
|
|
||||||
return firstThrow == 10;
|
|
||||||
} else {
|
|
||||||
return secondThrow == 10;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int getNbSpares() {
|
|
||||||
int nb = 0;
|
|
||||||
if (firstThrow != 10) {
|
|
||||||
if ((firstThrow ?? 0) + (secondThrow ?? 0) == 10) {
|
|
||||||
nb += 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ((thirdThrow ?? 0) + (secondThrow ?? 0) == 10) {
|
|
||||||
nb += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int getNbStrike() {
|
|
||||||
int nb = 0;
|
|
||||||
if (firstThrow == 10) {
|
|
||||||
nb += 1;
|
|
||||||
if (secondThrow == 10) {
|
|
||||||
nb += 1;
|
|
||||||
if (thirdThrow == 10) {
|
|
||||||
nb += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (thirdThrow == 10) {
|
|
||||||
nb += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int getPinsKnockedDown() {
|
|
||||||
return (firstThrow ?? 0) + (secondThrow ?? 0) + (thirdThrow ?? 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int getMaxPinsThisShot() {
|
|
||||||
if (firstThrow == null) {
|
|
||||||
return 10;
|
|
||||||
} else if (firstThrow == 10 && secondThrow == null) {
|
|
||||||
return 10;
|
|
||||||
} else if ( secondThrow == null ){
|
|
||||||
return 10 - ( firstThrow ?? 0 );
|
|
||||||
} else if ( ( firstThrow ?? 0 ) + ( secondThrow ?? 0 ) == 10 || secondThrow == 10 ){
|
|
||||||
return 10;
|
|
||||||
} else {
|
|
||||||
return 10 - ( secondThrow ?? 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import 'package:bowl_in/model/IAuthManager.dart';
|
|
||||||
import 'package:bowl_in/model/LocalManager/LocalData.dart';
|
|
||||||
|
|
||||||
class AuthManager extends IAuthManager {
|
|
||||||
final LocalData parent;
|
|
||||||
|
|
||||||
// Constructor
|
|
||||||
AuthManager(this.parent);
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool verifiedUser(String mail, String password) {
|
|
||||||
// TODO: implement verifiedUser
|
|
||||||
throw UnimplementedError();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,88 +0,0 @@
|
|||||||
import 'package:bowl_in/model/GameDetail.dart';
|
|
||||||
import 'package:bowl_in/model/IGameManager.dart';
|
|
||||||
import 'package:bowl_in/model/LocalManager/LocalData.dart';
|
|
||||||
import 'package:bowl_in/model/Player.dart';
|
|
||||||
|
|
||||||
import '../User.dart';
|
|
||||||
|
|
||||||
class GameManager extends IGameManager {
|
|
||||||
final LocalData parent;
|
|
||||||
|
|
||||||
// Constructor
|
|
||||||
GameManager(this.parent){
|
|
||||||
_initGame();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Methods
|
|
||||||
_initGame() async {
|
|
||||||
parent.gameDetails = await parent.database.readGameDetail();
|
|
||||||
}
|
|
||||||
|
|
||||||
GameDetail getGameById(int id) {
|
|
||||||
for (var element in parent.gameDetails) {
|
|
||||||
if (element.id == id) {
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw Exception("Game not found.");
|
|
||||||
}
|
|
||||||
|
|
||||||
saveGame(GameDetail gameDetail) async {
|
|
||||||
await parent.database.createGameDetail(gameDetail);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<GameDetail> getGamesByPlayerId(int id) {
|
|
||||||
return parent.gameDetails.where((element) =>
|
|
||||||
element.players.any((player) => player is User && player.id == id)
|
|
||||||
).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<GameDetail> getGamesByPlayer(Player user) {
|
|
||||||
return parent.gameDetails
|
|
||||||
.where((element) =>
|
|
||||||
element.players.any((player) => player is User && user is User && player.id == user.id))
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<GameDetail> getGamesByPlayers(List<Player> users) {
|
|
||||||
List<GameDetail> games = [];
|
|
||||||
for (var element in parent.gameDetails) {
|
|
||||||
if (element.players.toSet().containsAll(users.toSet())) {
|
|
||||||
games.add(element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return games;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<Player> getPlayersByIdGame(int id) {
|
|
||||||
final gameDetails = parent.gameDetails.firstWhere(
|
|
||||||
(element) => element.id == id,
|
|
||||||
orElse: () => throw Exception("Game not found.")
|
|
||||||
);
|
|
||||||
return gameDetails.players;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<Player, int> getRankByIdGame(int id) {
|
|
||||||
for (var game in parent.gameDetails) {
|
|
||||||
if (game.id == id) {
|
|
||||||
return game.getRank();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw Exception("Game not found.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
addGame(GameDetail gd) {
|
|
||||||
parent.gameDetails.add(gd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int getNextId() {
|
|
||||||
return parent.gameDetails.length;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
import 'package:bowl_in/database/sqlflite/BowlInDatabase.dart';
|
|
||||||
import 'package:bowl_in/model/IManager.dart';
|
|
||||||
import '../GameDetail.dart';
|
|
||||||
import 'GameManager.dart';
|
|
||||||
import 'UserManager.dart';
|
|
||||||
|
|
||||||
class LocalData extends IManager {
|
|
||||||
final BowlInDatabase database = BowlInDatabase();
|
|
||||||
|
|
||||||
LocalData() {
|
|
||||||
userMgr = UserManager(this);
|
|
||||||
gameMgr = GameManager(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<GameDetail> _gameDetails = [];
|
|
||||||
|
|
||||||
List<GameDetail> get gameDetails => _gameDetails;
|
|
||||||
|
|
||||||
set gameDetails(List<GameDetail> gameDetails) {
|
|
||||||
_gameDetails = gameDetails;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
import 'package:bowl_in/model/IUserManager.dart';
|
|
||||||
import 'package:bowl_in/model/LocalManager/LocalData.dart';
|
|
||||||
import 'package:bowl_in/model/Player.dart';
|
|
||||||
import 'package:bowl_in/model/User.dart';
|
|
||||||
import 'AuthManager.dart';
|
|
||||||
|
|
||||||
class UserManager extends IUserManager {
|
|
||||||
final LocalData parent;
|
|
||||||
|
|
||||||
// Constructor
|
|
||||||
UserManager(this.parent) : super(AuthManager(parent)) {
|
|
||||||
_initUser();
|
|
||||||
}
|
|
||||||
|
|
||||||
_initUser() async {
|
|
||||||
//await parent.database.deleteGameDetail();
|
|
||||||
//await parent.database.deleteUser(0);
|
|
||||||
//User crUser = User(0, "Lucas", "./assets/images/image_user_red.png", "", [], []);
|
|
||||||
//await saveUser(crUser);
|
|
||||||
var user = await parent.database.readUser(0);
|
|
||||||
if (user == null) {
|
|
||||||
User user2 =
|
|
||||||
User(0, "Unknown", "./assets/images/image_user_pink.png", "", [], []);
|
|
||||||
parent.userCurrent = user2;
|
|
||||||
} else {
|
|
||||||
parent.userCurrent = user;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
saveUser(User user) async {
|
|
||||||
var result = await parent.database.readUser(0);
|
|
||||||
if (result == null) {
|
|
||||||
await parent.database.createUser(user);
|
|
||||||
} else {
|
|
||||||
await parent.database.updateUser(user);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<User> getRankingWithFriends() {
|
|
||||||
List<User> sortedPlayers = List.from(parent.userCurrent.friends);
|
|
||||||
sortedPlayers.sort((a, b) => b.stat.highscore.compareTo(a.stat.highscore));
|
|
||||||
return sortedPlayers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Player getUserById(int id) {
|
|
||||||
throw UnimplementedError();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<Player> getUsersByName(String name) {
|
|
||||||
throw UnimplementedError();
|
|
||||||
}
|
|
||||||
}
|
|