2021-10-07 16:56:04 +02:00
|
|
|
public class Game {
|
2021-10-07 17:47:59 +02:00
|
|
|
|
|
|
|
private Gamefield gamefield;
|
|
|
|
Language language;
|
|
|
|
|
|
|
|
private int player1 = 1;
|
|
|
|
private int player2 = 2;
|
2021-10-07 17:24:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
public Game() {
|
2021-10-07 17:47:59 +02:00
|
|
|
gamefield = new Gamefield();
|
|
|
|
language = new Language("de");
|
|
|
|
}
|
|
|
|
|
|
|
|
public void placeField(int field) {
|
|
|
|
if (field > 9 || field < 1) {
|
|
|
|
// Fehler aufrufen von Klasse Sprache
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
gamefield.setField(field, player1);
|
|
|
|
|
|
|
|
switchPlayer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void switchPlayer() {
|
2021-10-07 17:24:24 +02:00
|
|
|
|
|
|
|
}
|
2021-10-07 17:47:59 +02:00
|
|
|
|
2021-10-07 17:24:24 +02:00
|
|
|
public void changeLanguage(String language) {
|
|
|
|
this.language.setOutputLanguage(language);
|
|
|
|
}
|
2021-10-07 16:56:04 +02:00
|
|
|
}
|