From 1758c33e670f8b4c2179a7666ce48b543f817c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Wed, 13 Jun 2012 23:06:12 +0200 Subject: [PATCH] changed loosed to neutral state and made white light onto it --- src/de/ctdo/crashtest/game/Statemachine.java | 2 +- src/de/ctdo/crashtest/game/TheGame.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/de/ctdo/crashtest/game/Statemachine.java b/src/de/ctdo/crashtest/game/Statemachine.java index a46f7ed..b6dadbf 100644 --- a/src/de/ctdo/crashtest/game/Statemachine.java +++ b/src/de/ctdo/crashtest/game/Statemachine.java @@ -20,7 +20,7 @@ public class Statemachine implements IStatemachine { TABLE_GAME_DONE, ROKET_STARTED, ROKET_DONE, - LOOSED + NEUTRAL } private final char RESET = '1'; diff --git a/src/de/ctdo/crashtest/game/TheGame.java b/src/de/ctdo/crashtest/game/TheGame.java index cb761ca..a08c39b 100644 --- a/src/de/ctdo/crashtest/game/TheGame.java +++ b/src/de/ctdo/crashtest/game/TheGame.java @@ -54,6 +54,12 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent ircClient.say("New State: " + newState); switch (newState) { + case NEUTRAL: + bunti.setPar56(255,255,255); + bunti.setLampel(false,false,false); + machine.stopTimer(); + + break; case IDLE: gamerRating = 3; machine.stopTimer(); @@ -388,11 +394,14 @@ public class TheGame implements StatemachineListener, GuiEventListener, IRCEvent int seconds = machine.getTimerSecondsLast(); int seconds1 = machine.getTimerSeconds(); + int seconds2 = seconds-seconds1; int mins = seconds / 60; int secs = seconds % 60; int mins1 = seconds1 / 60; int secs1 = seconds1 % 60; - ircClient.say("time " + mins1 + ":" + secs1 + " last: " + mins + ":" + secs + ""); + int mins2 = seconds2 / 60; + int secs2 = seconds2 % 60; + ircClient.say("time " + mins1 + ":" + secs1 + " last: " + mins + ":" + secs + " left: " + mins2 + ":" + secs2); ircClient.say("gamerRating: " + gamerRating); }