Added methods placeField and switchPlayer()

This commit is contained in:
MikeZyeman 2021-10-07 17:47:59 +02:00
parent 812555bed4
commit 1860f01b25
1 changed files with 26 additions and 3 deletions

View File

@ -1,13 +1,36 @@
public class Game { public class Game {
Language language;
private Gamefield gamefield;
Language language;
private int player1 = 1;
private int player2 = 2;
public Game() { public Game() {
language = new Language("de"); 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() {
}
public void changeLanguage(String language) { public void changeLanguage(String language) {
this.language.setOutputLanguage(language); this.language.setOutputLanguage(language);
} }
} }