diff --git a/manualtest/game/JTableTest.java b/manualtest/game/JTableTest.java deleted file mode 100644 index 40b30b9ca202250ad594f95c1f4afc869c0fde17..0000000000000000000000000000000000000000 --- a/manualtest/game/JTableTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package game; - -import java.awt.BorderLayout; -import java.io.File; -import java.io.IOException; - -import javax.swing.*; - -public class JTableTest { - - public static void main(String[] args) { - - GameModel testModel = new GameModel(10, 10); - testModel.setValueAt(true, 4, 4); - testModel.setValueAt(true, 4, 5); - testModel.setValueAt(true, 4, 6); - testModel.setValueAt(true, 5, 3); - testModel.setValueAt(true, 5, 4); - testModel.setValueAt(true, 5, 5 ); - JFrame testFrame = new JFrame(); - testFrame.setLayout(new BorderLayout()); - testFrame.add(new JTable(testModel)); - testFrame.setSize(300, 300); - JButton stepButton = new JButton("Step"); - JButton startButton = new JButton("Start"); - JButton stopButton = new JButton("Stop"); - startButton.addActionListener(new StartButtonListener(testModel)); - stepButton.addActionListener(new StepButtonListener(testModel)); - stopButton.addActionListener(new StopButtonListener(testModel)); - JPanel bottomPanel = new JPanel(); - bottomPanel.add(stepButton); - bottomPanel.add(startButton); - bottomPanel.add(stopButton); - testFrame.add(bottomPanel, BorderLayout.PAGE_END); - testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - testFrame.setVisible(true); - } - -} diff --git a/manualtest/game/StartButtonListener.java b/manualtest/game/StartButtonListener.java deleted file mode 100644 index 4933568a609db40c5f8fc19f153bb1a9f832eb54..0000000000000000000000000000000000000000 --- a/manualtest/game/StartButtonListener.java +++ /dev/null @@ -1,20 +0,0 @@ -package game; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class StartButtonListener implements ActionListener { - - private GameModel model; - - public StartButtonListener(GameModel model) { - this.model=model; - } - - @Override - public void actionPerformed(ActionEvent e) { - model.start(); - - } - -} diff --git a/manualtest/game/StepButtonListener.java b/manualtest/game/StepButtonListener.java deleted file mode 100644 index 630cb2b5f4b701a541f9124dd8650bee4584ad51..0000000000000000000000000000000000000000 --- a/manualtest/game/StepButtonListener.java +++ /dev/null @@ -1,19 +0,0 @@ -package game; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class StepButtonListener implements ActionListener { - - private GameModel model; - - public StepButtonListener(GameModel model) { - this.model=model; - } - - public void actionPerformed(ActionEvent e) { - model.step(); - - } - -} diff --git a/manualtest/game/StopButtonListener.java b/manualtest/game/StopButtonListener.java deleted file mode 100644 index a90ccbcb485c67d5ee3b9d649aa83c99902ca50d..0000000000000000000000000000000000000000 --- a/manualtest/game/StopButtonListener.java +++ /dev/null @@ -1,17 +0,0 @@ -package game; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class StopButtonListener implements ActionListener { - - private GameModel model; - - public StopButtonListener(GameModel model) { - this.model = model; - } - - public void actionPerformed(ActionEvent e) { - model.stop(); - } -} diff --git a/manualtest/game/StartWindowTest.java b/src/game/Main.java similarity index 60% rename from manualtest/game/StartWindowTest.java rename to src/game/Main.java index 8688844f92b648d04361d342a0981027865ab2a8..dff55984ff1aea9b99d546b5fcbe1fb2cc289823 100644 --- a/manualtest/game/StartWindowTest.java +++ b/src/game/Main.java @@ -1,16 +1,10 @@ package game; -import game.StartWindow; - import javax.swing.JFrame; -public class StartWindowTest { +public class Main { public static void main(String[] args) { JFrame startWindowFrame = new StartWindow(new StartModel()); startWindowFrame.setVisible(true); - - StartModel start = new StartModel(); - //start.loadFromFile(); } - }