Commit af57d15d authored by rakam's avatar rakam
Browse files

Add Stats enum

parent d53129e1
...@@ -23,6 +23,7 @@ import fr.istic.masteru.android.automate.SimplePoint; ...@@ -23,6 +23,7 @@ import fr.istic.masteru.android.automate.SimplePoint;
import fr.istic.masteru.android.listeners.OnSyncFinishListener; import fr.istic.masteru.android.listeners.OnSyncFinishListener;
import fr.istic.masteru.android.model.Match; import fr.istic.masteru.android.model.Match;
import fr.istic.masteru.android.model.Point; import fr.istic.masteru.android.model.Point;
import fr.istic.masteru.android.model.Stats;
import fr.istic.masteru.android.utils.ScoreSyncManager; import fr.istic.masteru.android.utils.ScoreSyncManager;
import fr.istic.masteru.android.utils.Utils; import fr.istic.masteru.android.utils.Utils;
import fr.istic.masteru.android.views.MatchScoreView; import fr.istic.masteru.android.views.MatchScoreView;
...@@ -338,26 +339,26 @@ public abstract class MatchActivity extends Activity { ...@@ -338,26 +339,26 @@ public abstract class MatchActivity extends Activity {
leftPointButton.setOnClickListener(new View.OnClickListener() { leftPointButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(0), null)); updateUI(new Point(automate.point(0), Stats.NONE));
} }
}); });
leftAceButton.setOnClickListener(new View.OnClickListener() { leftAceButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(0), "ACE")); updateUI(new Point(automate.point(0), Stats.ACE));
} }
}); });
rightPointButton.setOnClickListener(new View.OnClickListener() { rightPointButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(1), null)); updateUI(new Point(automate.point(1), Stats.NONE));
} }
}); });
rightAceButton.setOnClickListener(new View.OnClickListener() { rightAceButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(1), "ACE")); updateUI(new Point(automate.point(1), Stats.ACE));
} }
}); });
} }
...@@ -366,26 +367,26 @@ public abstract class MatchActivity extends Activity { ...@@ -366,26 +367,26 @@ public abstract class MatchActivity extends Activity {
leftPointButton.setOnClickListener(new View.OnClickListener() { leftPointButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(1), null)); updateUI(new Point(automate.point(1), Stats.NONE));
} }
}); });
leftAceButton.setOnClickListener(new View.OnClickListener() { leftAceButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(1), "ACE")); updateUI(new Point(automate.point(1), Stats.ACE));
} }
}); });
rightPointButton.setOnClickListener(new View.OnClickListener() { rightPointButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(0), null)); updateUI(new Point(automate.point(0), Stats.NONE));
} }
}); });
rightAceButton.setOnClickListener(new View.OnClickListener() { rightAceButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
updateUI(new Point(automate.point(0), "ACE")); updateUI(new Point(automate.point(0), Stats.ACE));
} }
}); });
} }
......
...@@ -5,9 +5,9 @@ import fr.istic.masteru.android.automate.Score; ...@@ -5,9 +5,9 @@ import fr.istic.masteru.android.automate.Score;
public class Point { public class Point {
private final Score score; private final Score score;
private final String stats; private final Stats stats;
public Point(Score score, String stats) { public Point(Score score, Stats stats) {
this.score = score; this.score = score;
this.stats = stats; this.stats = stats;
} }
...@@ -16,7 +16,7 @@ public class Point { ...@@ -16,7 +16,7 @@ public class Point {
return score; return score;
} }
public String getStats() { public Stats getStats() {
return stats; return stats;
} }
} }
package fr.istic.masteru.android.model;
public enum Stats {
NONE, ACE, DF
}
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