diff options
Diffstat (limited to 'PunchingBag/src')
-rw-r--r-- | PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java | 8 | ||||
-rw-r--r-- | PunchingBag/src/uk/ac/open/punchingbag/examples/SimpleKeyboard.java | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java index 0c33499..7a7010c 100644 --- a/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java +++ b/PunchingBag/src/uk/ac/open/punchingbag/PunchingBagGUI.java @@ -64,7 +64,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, Debug, Menu }; - Mode currentMode = Mode.Debug; + Mode currentMode = Mode.Menu; JFrame frame; @@ -111,7 +111,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, } frame = new JFrame("Punching Bag GUI"); - // frame.setUndecorated(true); + frame.setUndecorated(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // frame.setSize(600, 600); @@ -146,8 +146,8 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, programOptionsPanel.add(new JButton("Debug")); frame.add(bagDebugingPanel); - //frame.add(new DisplayPanel(), BorderLayout.CENTER); - //frame.add(programOptionsPanel, BorderLayout.SOUTH); + frame.add(new DisplayPanel(), BorderLayout.CENTER); + frame.add(programOptionsPanel, BorderLayout.SOUTH); setMode(currentMode); diff --git a/PunchingBag/src/uk/ac/open/punchingbag/examples/SimpleKeyboard.java b/PunchingBag/src/uk/ac/open/punchingbag/examples/SimpleKeyboard.java index 9c05254..1e791ee 100644 --- a/PunchingBag/src/uk/ac/open/punchingbag/examples/SimpleKeyboard.java +++ b/PunchingBag/src/uk/ac/open/punchingbag/examples/SimpleKeyboard.java @@ -277,7 +277,7 @@ public class SimpleKeyboard implements ButtonListener, Runnable { public void run() { while (true) { System.out.println("Checking last action time"); - if ((System.currentTimeMillis() - lastActionTime) > 60000) { + if ((System.currentTimeMillis() - lastActionTime) > 20000) { System.out.println("Activating Noise"); bag.noise(new Rectangle(0, 0, 9, 20)); @@ -287,7 +287,7 @@ public class SimpleKeyboard implements ButtonListener, Runnable { System.out.println("Waiting more"); } try { - Thread.sleep(20000); + Thread.sleep(10000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); |