You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
520 B
27 lines
520 B
package Game;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
public abstract class Game {
|
|
|
|
protected ArrayList<String> outputBuffer = new ArrayList<>();
|
|
|
|
public abstract void update(String string);
|
|
|
|
public void print() {
|
|
for (String s : outputBuffer) {
|
|
System.out.println(s);
|
|
}
|
|
}
|
|
|
|
protected void setOutputBuffer(ArrayList<String> outputBuffer) {
|
|
this.outputBuffer = outputBuffer;
|
|
}
|
|
|
|
public ArrayList<String> getOutputBuffer() {
|
|
return this.outputBuffer;
|
|
}
|
|
|
|
|
|
|
|
}
|