Commit 3b0d79fa authored by Turid Cecilie Dahl's avatar Turid Cecilie Dahl
Browse files

#97 Adds tournament fetching when clicking in on a tournament

parent 707bc27f
...@@ -21,6 +21,7 @@ import com.gameware.game.models.Round; ...@@ -21,6 +21,7 @@ import com.gameware.game.models.Round;
import com.gameware.game.models.Tournament; import com.gameware.game.models.Tournament;
import com.gameware.game.sprites.LoadingText; import com.gameware.game.sprites.LoadingText;
import java.io.IOException;
import java.util.List; import java.util.List;
public class ViewTournamentState extends State { public class ViewTournamentState extends State {
...@@ -61,7 +62,12 @@ public class ViewTournamentState extends State { ...@@ -61,7 +62,12 @@ public class ViewTournamentState extends State {
public ViewTournamentState(GameStateManager gsm, Tournament tournament, Round r) { public ViewTournamentState(GameStateManager gsm, Tournament tournament, Round r) {
super(gsm); super(gsm);
this.tournament = tournament; try {
this.tournament = QueryIntermediate.getSpecificTournament(tournament.get_id());
}catch (IOException e){
this.tournament = tournament;
}
this.round = r; this.round = r;
titleLabel.setText(tournament.getName()); titleLabel.setText(tournament.getName());
roundDeadline.setText("Round deadline\n"+round.getDeadlineDate().toLocaleString()); roundDeadline.setText("Round deadline\n"+round.getDeadlineDate().toLocaleString());
......
Supports Markdown
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