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;
import fr.istic.masteru.android.listeners.OnSyncFinishListener;
import fr.istic.masteru.android.model.Match;
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.Utils;
import fr.istic.masteru.android.views.MatchScoreView;
......@@ -338,26 +339,26 @@ public abstract class MatchActivity extends Activity {
leftPointButton.setOnClickListener(new View.OnClickListener() {
@Override
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() {
@Override
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() {
@Override
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() {
@Override
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 {
leftPointButton.setOnClickListener(new View.OnClickListener() {
@Override
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() {
@Override
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() {
@Override
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() {
@Override
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;
public class Point {
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.stats = stats;
}
......@@ -16,7 +16,7 @@ public class Point {
return score;
}
public String getStats() {
public Stats getStats() {
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