Added methods placeField and switchPlayer()
This commit is contained in:
parent
812555bed4
commit
1860f01b25
|
@ -1,13 +1,36 @@
|
||||||
public class Game {
|
public class Game {
|
||||||
|
|
||||||
|
private Gamefield gamefield;
|
||||||
Language language;
|
Language language;
|
||||||
|
|
||||||
|
private int player1 = 1;
|
||||||
|
private int player2 = 2;
|
||||||
|
|
||||||
|
|
||||||
public Game() {
|
public Game() {
|
||||||
|
gamefield = new Gamefield();
|
||||||
language = new Language("de");
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue