From 446b2b57f363765a3bb175814762e42c5c8ec657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sat, 7 May 2016 13:35:20 +0200 Subject: [PATCH] implemented all the good stuff in FlowOfTime.java --- cicaprojekt/FlowOfTime.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cicaprojekt/FlowOfTime.java b/cicaprojekt/FlowOfTime.java index 496a372..c6c1d9c 100644 --- a/cicaprojekt/FlowOfTime.java +++ b/cicaprojekt/FlowOfTime.java @@ -6,8 +6,18 @@ import java.util.TimerTask; public class FlowOfTime extends Timer { private TimerTask timeup; private long gametime; + private Game game; - public void start() { + private class GameOver extends TimerTask { + + @Override + public void run() { + game.stopGame(); + } + } + + public void start(long delay) { + schedule(new GameOver(), delay); } }