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

  1. package Game;
  2. import java.util.ArrayList;
  3. public abstract class Game {
  4. protected ArrayList<String> outputBuffer = new ArrayList<>();
  5. public abstract void update(String string);
  6. public void print() {
  7. for (String s : outputBuffer) {
  8. System.out.println(s);
  9. }
  10. }
  11. protected void setOutputBuffer(ArrayList<String> outputBuffer) {
  12. this.outputBuffer = outputBuffer;
  13. }
  14. public ArrayList<String> getOutputBuffer() {
  15. return this.outputBuffer;
  16. }
  17. }