From 2214dcc0c067f12ff5f48d281ba98f1bcc48385f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Fri, 22 Jun 2012 01:57:15 +0200 Subject: [PATCH] added reset option --- src/de/ctdo/crashtest/cardplayer/MainFrame.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/de/ctdo/crashtest/cardplayer/MainFrame.java b/src/de/ctdo/crashtest/cardplayer/MainFrame.java index 6bf6799..81f8fca 100644 --- a/src/de/ctdo/crashtest/cardplayer/MainFrame.java +++ b/src/de/ctdo/crashtest/cardplayer/MainFrame.java @@ -81,6 +81,7 @@ public class MainFrame extends JFrame { JScrollPane listScroller = new JScrollPane(jListWall); Vector states = new Vector(); + states.add("-> reset game"); states.add("IDLE"); states.add("ENTERED_ROOM"); states.add("TABLE_GAME_ONE"); @@ -90,6 +91,7 @@ public class MainFrame extends JFrame { states.add("TABLE_GAME_FIVE"); states.add("TABLE_GAME_SIX"); states.add("TABLE_GAME_DONE"); + states.add("TABLE_GAME_WRONG"); states.add("ROKET_STARTED"); states.add("ROKET_DONE"); states.add("NEUTRAL"); @@ -105,7 +107,13 @@ public class MainFrame extends JFrame { ListModel dlm = jListStates.getModel(); Object item = dlm.getElementAt(index); jListStates.ensureIndexIsVisible(index); - if (irc != null) irc.say(">state " + item); + if (irc != null) { + if("-> reset game".contentEquals(item.toString())) { + irc.say(">reset"); + } else { + irc.say(">state " + item); + } + } } } });