From 83ab0fd8fdf0f24341a8647a2a5194d93898871d Mon Sep 17 00:00:00 2001 From: Yanaki Kolarov Date: Mon, 4 May 2020 23:09:36 +0100 Subject: [PATCH] a function has been added to remove each object from the things arraylist --- GameArena.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/GameArena.java b/GameArena.java index 8d74c66..337448f 100644 --- a/GameArena.java +++ b/GameArena.java @@ -458,6 +458,15 @@ public void removeText(Text t) this.removeObject(t); } + /** + * Removes every object that has ever been added to the GameArena. Nothing + * should appear on the GameArena window after this has executed. + */ + public void clearGameArena() { + things.clear(); + } + + /** * Pause for a 1/50 of a second. * This method causes your program to delay for 1/50th of a second. You'll find this useful if you're trying to animate your application.