solved Problem "points and places of games are not saved in file."
This commit is contained in:
parent
5e88960c8a
commit
89e72a1592
|
@ -93,6 +93,12 @@ public class FactoryDecorator implements IsObservable{
|
||||||
controller.addListener(gameDecorators.get(j*2));
|
controller.addListener(gameDecorators.get(j*2));
|
||||||
controller.addListener(gameDecorators.get(j*2+1));
|
controller.addListener(gameDecorators.get(j*2+1));
|
||||||
}
|
}
|
||||||
|
gameDecorator.addListener(new IsObserver() {
|
||||||
|
@Override
|
||||||
|
public void update() {
|
||||||
|
tournamentDecorator.saveTournament();
|
||||||
|
}
|
||||||
|
});
|
||||||
controller.loadContent();
|
controller.loadContent();
|
||||||
}
|
}
|
||||||
hBoxCenter.getChildren().add(vBox);
|
hBoxCenter.getChildren().add(vBox);
|
||||||
|
|
|
@ -39,6 +39,8 @@ public class GameController extends FXController{
|
||||||
participantNameTwo.setText(gameDecorator.getParticipantTwo());
|
participantNameTwo.setText(gameDecorator.getParticipantTwo());
|
||||||
pointsTeamOne.setText(String.valueOf(gameDecorator.getPoints1()));
|
pointsTeamOne.setText(String.valueOf(gameDecorator.getPoints1()));
|
||||||
pointsTeamTwo.setText(String.valueOf(gameDecorator.getPoints2()));
|
pointsTeamTwo.setText(String.valueOf(gameDecorator.getPoints2()));
|
||||||
|
placesChoiceBox.setItems(getTournamentDecorator().getTournament().getPlaces());
|
||||||
|
placesChoiceBox.setValue(gameDecorator.getPlace());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshParticipants(){
|
public void refreshParticipants(){
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class GameDecorator implements IsObservable{
|
||||||
game.refreshParticipants();
|
game.refreshParticipants();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Place getLocation() {
|
public Place getPlace() {
|
||||||
return game.getPlace();
|
return game.getPlace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue