Commit d3145e65 authored by rakam's avatar rakam
Browse files

Ne synchronize pas le nouveau set à la fin d'un match

parent fa542f60
......@@ -3,7 +3,7 @@
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>
......
......@@ -3,6 +3,7 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Resume.iml" filepath="$PROJECT_DIR$/Resume.iml" />
<module fileurl="file://$PROJECT_DIR$/android.iml" filepath="$PROJECT_DIR$/android.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
......
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Resume" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="android" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
......@@ -80,11 +80,11 @@
</content>
<orderEntry type="jdk" jdkName="Android API 20 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="ion-1.4.1" level="project" />
<orderEntry type="library" exported="" name="androidasync-1.4.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-20.0.0" level="project" />
<orderEntry type="library" exported="" name="ion-1.4.1" level="project" />
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
</component>
</module>
......@@ -59,18 +59,19 @@ public class ScoreSyncManager {
if (score.getId() < scoreIdMax) {
back(score.getId());
} else if (score.getId() > 0) {
syncQueue.put((float) score.getId(), score);
scoreIdMax = score.getId();
if (score.getVainqueur() == -1) {
syncQueue.put((float) score.getId(), score);
scoreIdMax = score.getId();
} else {
WinnerToSync winnerToSync = new WinnerToSync(score.getVainqueur() == 0 ? "A" : "B");
syncQueue.put(score.getId() + 0.2f, winnerToSync);
}
if (score.getPreviousSet() != null) {
PreviousSetToSync setToSync = new PreviousSetToSync(score.getNumSet(),
score.getPreviousSet().getSetA(),
score.getPreviousSet().getSetB());
syncQueue.put(score.getId() + 0.1f, setToSync);
}
if (score.getVainqueur() != -1) {
WinnerToSync winnerToSync = new WinnerToSync(score.getVainqueur() == 0 ? "A" : "B");
syncQueue.put(score.getId() + 0.2f, winnerToSync);
}
}
if (!isSyncing()) {
syncNextElement();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment