Bot make print overridable
This commit is contained in:
parent
0410084441
commit
c9a3937a12
@ -32,7 +32,7 @@ public abstract class Bot implements Runnable {
|
||||
View view = new View();
|
||||
while (true) {
|
||||
view.read(in);
|
||||
view.print();
|
||||
print(view);
|
||||
try {
|
||||
char ch = nextMove(view);
|
||||
out.write(ch);
|
||||
@ -44,6 +44,10 @@ public abstract class Bot implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
protected void print(View view) {
|
||||
view.print();
|
||||
}
|
||||
|
||||
// Diese Methode ermittelt den nächsten Zug des Bots. Sie wird von der
|
||||
// run-Methode aufgerufen, nachdem der Server das Spielfeld gesendet hat.
|
||||
// Subklassen müssen diese Methode implementieren.
|
||||
|
Loading…
x
Reference in New Issue
Block a user