diff --git a/.idea/libraries/jlayer_1_0_3.xml b/.idea/libraries/jlayer_1_0_3.xml index 2457be1..b09f4ed 100644 --- a/.idea/libraries/jlayer_1_0_3.xml +++ b/.idea/libraries/jlayer_1_0_3.xml @@ -2,6 +2,7 @@ + diff --git a/src/HalloSchiffeVersenken.java b/src/HalloSchiffeVersenken.java index b84600f..76b14be 100644 --- a/src/HalloSchiffeVersenken.java +++ b/src/HalloSchiffeVersenken.java @@ -2,9 +2,8 @@ public class HalloSchiffeVersenken { public static void main(String[] args) throws InterruptedException { + /* Blop wurde eliminiert System.out.println("HelloSchiffeVersenekn"); - - System.out.println("sound"); SoundHandler.playSound("hit"); Thread.sleep(3000); @@ -13,7 +12,8 @@ public class HalloSchiffeVersenken { SoundHandler.setSoundOn(false); System.out.println("sound off"); SoundHandler.playSound("hit"); + */ - + startLocalGame huso = new startLocalGame(); } } diff --git a/src/startLocalGame.java b/src/startLocalGame.java new file mode 100644 index 0000000..273af2b --- /dev/null +++ b/src/startLocalGame.java @@ -0,0 +1,71 @@ +import javax.swing.*; + +public class startLocalGame { + // Frame + JFrame frame = new JFrame("Lokales Spiel"); + + // Labels + JLabel frameTitle = new JLabel("Lokales Spiel"); + JLabel semesterlable = new JLabel("Semester"); + JLabel leftPlayerName = new JLabel("Name"); + JLabel rightPlayerName = new JLabel("KI-Level"); + + // Buttons + JButton backButton = new JButton("Zurück"); + JButton leftPlayerLeftButton = new JButton("<-"); + JButton leftPlayerRightButton = new JButton("->"); + JButton semesterUpButton = new JButton("^"); + JButton semesterDownButton = new JButton("v"); + JButton rightPlayerLeftButton = new JButton("<-"); + JButton rightPlayerRightButton = new JButton("->"); + JButton startButton = new JButton("Start!"); + + startLocalGame() { + // Erstelle Frame + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setSize(1500, 1000); + + // Setzt den Layout-Manager auf null, um absolute Positionierung zu ermöglichen + frame.setLayout(null); + + // Erstelle Label + frameTitle.setBounds(50, 20, 200, 30); + frame.add(frameTitle); + + semesterlable.setBounds(400, 300, 200, 30); + frame.add(semesterlable); + + leftPlayerName.setBounds(50, 550, 200, 30); + frame.add(leftPlayerName); + + rightPlayerName.setBounds(750, 550, 200, 30); + frame.add(rightPlayerName); + + // Erstellt Buttons + backButton.setBounds(800, 20, 120, 30); + frame.add(backButton); + + leftPlayerLeftButton.setBounds(50, 450, 50, 50); + frame.add(leftPlayerLeftButton); + + leftPlayerRightButton.setBounds(250, 450, 50, 50); + frame.add(leftPlayerRightButton); + + semesterUpButton.setBounds(500, 400, 50, 50); + frame.add(semesterUpButton); + + semesterDownButton.setBounds(500, 600, 50, 50); + frame.add(semesterDownButton); + + rightPlayerLeftButton.setBounds(750, 450, 50, 50); + frame.add(rightPlayerLeftButton); + + rightPlayerRightButton.setBounds(950, 450, 50, 50); + frame.add(rightPlayerRightButton); + + startButton.setBounds(400, 750, 100, 50); + frame.add(startButton); + + frame.setVisible(true); + } +}