diff --git a/ancien/HexagonGridPattern.java b/ancien/HexagonGridPattern.java deleted file mode 100644 index 69595b1..0000000 --- a/ancien/HexagonGridPattern.java +++ /dev/null @@ -1,97 +0,0 @@ -import javax.swing.*; -import java.awt.*; -import java.awt.geom.Path2D; -import java.util.Random; - -public class HexagonGridPattern extends JPanel { - - int bigHexRadius = 170; - int smallHexRadius = 30; - Color[] blueShades = {new Color(173, 216, 230), new Color(135, 206, 250), new Color(0, 191, 255)}; - - public void paintComponent(Graphics g) { - super.paintComponent(g); - Graphics2D g2d = (Graphics2D) g; - drawBigHexagonWithSmallHexagons(g2d, 300, 300, bigHexRadius); - } - - public void drawBigHexagonWithSmallHexagons(Graphics2D g2d, int x, int y, int radius) { - g2d.setColor(Color.BLACK); - drawHexagon(g2d, x, y, radius, false); - - int xOffset = (int) (smallHexRadius * 2); - int yOffset = (int) (Math.sqrt(3) * smallHexRadius); - - Random random = new Random(); - - for (int row = -3; row <= 3; row++) { - for (int col = -3; col <= 3; col++) { - int xPos = x + col * xOffset; - int yPos = y + row * yOffset; - - if (row % 2 != 0) { - xPos += xOffset / 2; - } - - if (isInsideBigHexagon(xPos, yPos, x, y, radius)) { - g2d.setColor(blueShades[random.nextInt(blueShades.length)]); - drawInvertedHexagon(g2d, xPos, yPos, smallHexRadius, true); - } - } - } - } - - public boolean isInsideBigHexagon(int xPos, int yPos, int centerX, int centerY, int radius) { - double dx = Math.abs(xPos - centerX); - double dy = Math.abs(yPos - centerY); - return dx + dy < radius * Math.sqrt(3); - } - - public void drawHexagon(Graphics2D g2d, int x, int y, int radius, boolean fill) { - Path2D hexagon = new Path2D.Double(); - for (int i = 0; i < 6; i++) { - double angle = Math.toRadians(60 * i); - int xOffset = (int) (x + radius * Math.cos(angle)); - int yOffset = (int) (y + radius * Math.sin(angle)); - if (i == 0) { - hexagon.moveTo(xOffset, yOffset); - } else { - hexagon.lineTo(xOffset, yOffset); - } - } - hexagon.closePath(); - if (fill) { - g2d.fill(hexagon); - } - g2d.setColor(Color.BLACK); - g2d.draw(hexagon); - } - - public void drawInvertedHexagon(Graphics2D g2d, int x, int y, int radius, boolean fill) { - Path2D hexagon = new Path2D.Double(); - for (int i = 0; i < 6; i++) { - double angle = Math.toRadians(60 * i + 30); - int xOffset = (int) (x + radius * Math.cos(angle)); - int yOffset = (int) (y + radius * Math.sin(angle)); - if (i == 0) { - hexagon.moveTo(xOffset, yOffset); - } else { - hexagon.lineTo(xOffset, yOffset); - } - } - hexagon.closePath(); - if (fill) { - g2d.fill(hexagon); - } - g2d.setColor(Color.BLACK); - g2d.draw(hexagon); - } - - public static void main(String[] args) { - JFrame frame = new JFrame(); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setSize(600, 600); - frame.add(new HexagonGridPattern()); - frame.setVisible(true); - } -} diff --git a/ancien/HexagonGridWithSmallerHexagons.java b/ancien/HexagonGridWithSmallerHexagons.java deleted file mode 100644 index 3141cc7..0000000 --- a/ancien/HexagonGridWithSmallerHexagons.java +++ /dev/null @@ -1,72 +0,0 @@ -import javax.swing.*; -import java.awt.*; -import java.awt.geom.Path2D; - -public class HexagonGridWithSmallerHexagons extends JPanel { - - int bigHexRadius = 100; - int smallHexRadius = 15; - - public void paintComponent(Graphics g) { - super.paintComponent(g); - Graphics2D g2d = (Graphics2D) g; - drawBigHexagonWithSmallHexagons(g2d, 200, 200, bigHexRadius); - } - - public void drawBigHexagonWithSmallHexagons(Graphics2D g2d, int x, int y, int radius) { - g2d.setColor(Color.BLACK); - drawHexagon(g2d, x, y, radius, true); - - int xOffset = (int) (1.5 * smallHexRadius); - int yOffset = (int) (Math.sqrt(3) * smallHexRadius / 2); - - for (int row = -3; row <= 3; row++) { - for (int col = -3; col <= 3; col++) { - int xPos = x + col * xOffset; - int yPos = y + row * yOffset * 2; - if (col % 2 != 0) { - yPos += yOffset; - } - if (isInsideBigHexagon(xPos, yPos, x, y, radius)) { - g2d.setColor(new Color(135, 206, 235)); - drawHexagon(g2d, xPos, yPos, smallHexRadius, true); - } - } - } - } - - public boolean isInsideBigHexagon(int xPos, int yPos, int centerX, int centerY, int radius) { - double dx = Math.abs(xPos - centerX); - double dy = Math.abs(yPos - centerY); - double distance = Math.sqrt(dx * dx + dy * dy); - return distance < radius; - } - - public void drawHexagon(Graphics2D g2d, int x, int y, int radius, boolean fill) { - Path2D hexagon = new Path2D.Double(); - for (int i = 0; i < 6; i++) { - double angle = Math.toRadians(60 * i); - int xOffset = (int) (x + radius * Math.cos(angle)); - int yOffset = (int) (y + radius * Math.sin(angle)); - if (i == 0) { - hexagon.moveTo(xOffset, yOffset); - } else { - hexagon.lineTo(xOffset, yOffset); - } - } - hexagon.closePath(); - if (fill) { - g2d.fill(hexagon); - } - g2d.setColor(Color.BLACK); - g2d.draw(hexagon); - } - - public static void main(String[] args) { - JFrame frame = new JFrame(); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setSize(500, 500); - frame.add(new HexagonGridWithSmallerHexagons()); - frame.setVisible(true); - } -} diff --git a/ancien/SerieSelection.java b/ancien/SerieSelection.java deleted file mode 100644 index a3a5ea5..0000000 --- a/ancien/SerieSelection.java +++ /dev/null @@ -1,63 +0,0 @@ -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class SerieSelection { - - public static void main(String[] args) { - JFrame fenetre = new JFrame("Sélection de série"); - fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - fenetre.setSize(600, 200); - fenetre.setLayout(new BorderLayout()); - - JLabel message = new JLabel("Avec quelle série voulez-vous jouer ?", JLabel.CENTER); - message.setFont(new Font("Arial", Font.BOLD, 16)); - fenetre.add(message, BorderLayout.NORTH); - - JPanel panelBoutons = new JPanel(); - panelBoutons.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 20)); - - JButton serie1Button = new JButton("Série 1"); - JButton serie2Button = new JButton("Série 2"); - JButton serie3Button = new JButton("Série 3"); - JButton serie4Button = new JButton("Série 4"); - - serie1Button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - JOptionPane.showMessageDialog(fenetre, "Vous avez sélectionné la Série 1 !"); - } - }); - - serie2Button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - JOptionPane.showMessageDialog(fenetre, "Vous avez sélectionné la Série 2 !"); - } - }); - - serie3Button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - JOptionPane.showMessageDialog(fenetre, "Vous avez sélectionné la Série 3 !"); - } - }); - - serie4Button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - JOptionPane.showMessageDialog(fenetre, "Vous avez sélectionné la Série 4 !"); - } - }); - - panelBoutons.add(serie1Button); - panelBoutons.add(serie2Button); - panelBoutons.add(serie3Button); - panelBoutons.add(serie4Button); - - fenetre.add(panelBoutons, BorderLayout.CENTER); - - fenetre.setVisible(true); - } -} diff --git a/ancien/src/Main.java b/ancien/src/Main.java deleted file mode 100644 index 9c65100..0000000 --- a/ancien/src/Main.java +++ /dev/null @@ -1,17 +0,0 @@ -import java.awt.Menu; - -import controllers.MenuController; -import models.MenuModel; -import views.MenuView; - -public class Main { - public static void main(String[] args) { - // Initialisation du modèle, de la vue et du contrôleur - MenuModel model = new MenuModel(); - MenuView view = new MenuView(); - MenuController controller = new MenuController(model, view); - - // Affichage de la fenêtre - view.setVisible(true); - } -} \ No newline at end of file diff --git a/ancien/src/controllers/MenuController.java b/ancien/src/controllers/MenuController.java deleted file mode 100644 index ddcacea..0000000 --- a/ancien/src/controllers/MenuController.java +++ /dev/null @@ -1,18 +0,0 @@ -package controllers; -import models.*; -import views.*; - - -public class MenuController { - private MenuModel model; - private MenuView view; - - public MenuController(MenuModel model, MenuView view) { - this.model = model; - this.view = view; - - view.getResumeButton().addActionListener(new ResListener()); - view.getNewGameButton().addActionListener(new NewListener()); - } -} - diff --git a/ancien/src/controllers/NewListener.java b/ancien/src/controllers/NewListener.java deleted file mode 100644 index 7acacfc..0000000 --- a/ancien/src/controllers/NewListener.java +++ /dev/null @@ -1,11 +0,0 @@ -package controllers; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class NewListener implements ActionListener { - @Override - public void actionPerformed(ActionEvent e) { - System.out.println("Juste pour tester - New Game"); - - } -} \ No newline at end of file diff --git a/ancien/src/controllers/ResListener.java b/ancien/src/controllers/ResListener.java deleted file mode 100644 index 6779500..0000000 --- a/ancien/src/controllers/ResListener.java +++ /dev/null @@ -1,11 +0,0 @@ -package controllers; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class ResListener implements ActionListener { - @Override - public void actionPerformed(ActionEvent e) { - System.out.println("Juste pour tester "); - - } -} \ No newline at end of file diff --git a/ancien/src/models/MenuModel.java b/ancien/src/models/MenuModel.java deleted file mode 100644 index 2e76578..0000000 --- a/ancien/src/models/MenuModel.java +++ /dev/null @@ -1,10 +0,0 @@ -package models; - - -public class MenuModel { - - public MenuModel() { - // rien du tout pour l'instant - } - -} diff --git a/ancien/src/views/MenuView.java b/ancien/src/views/MenuView.java deleted file mode 100644 index e7dfee2..0000000 --- a/ancien/src/views/MenuView.java +++ /dev/null @@ -1,65 +0,0 @@ -package views; - -import javax.swing.*; -import java.awt.*; -import java.io.IOException; - -public class MenuView extends JPanel { - private BtnPerso resumeButton; - private BtnPerso newGameButton; - private JButton quitButton; - - private Image backgroundImage; - private Image logo; - private ImageIcon quit; - - - - - public MenuView() throws FontFormatException, IOException{ - backgroundImage = new ImageIcon("C:\\Users\\topba\\OneDrive\\Desktop\\BUT\\annee2\\DEV3.1\\Dorfromantik\\scr\\views\\img\\bg.png").getImage(); - setLayout(null); - logo = new ImageIcon("C:\\Users\\topba\\OneDrive\\Desktop\\BUT\\annee2\\DEV3.1\\Dorfromantik\\scr\\views\\img\\D.png").getImage(); - quit = new ImageIcon("C:\\Users\\topba\\OneDrive\\Desktop\\BUT\\annee2\\DEV3.1\\Dorfromantik\\scr\\views\\img\\quit.png"); - Image quit1 = quit.getImage(); - - resumeButton = new BtnPerso("RESUME"); - newGameButton = new BtnPerso("NEW GAME"); - - int buttonWidth = 65; - int buttonHeight = 40; - - Image resizedImage = quit1.getScaledInstance(buttonWidth, buttonHeight, Image.SCALE_SMOOTH); - ImageIcon resizedIcon = new ImageIcon(resizedImage); - quitButton = new JButton(resizedIcon); - quitButton.setPreferredSize(new Dimension(buttonWidth, buttonHeight)); - resumeButton.setBounds(-50, 350, 400, 50); - newGameButton.setBounds(-20, 420, 400, 50); - quitButton.setBounds(270, 630,50,50); - quitButton.setBackground(new Color(215, 171, 115, 150)); - quitButton.setBorderPainted(false); - - add(quitButton); - add(resumeButton); - add(newGameButton); - } - - @Override - protected void paintComponent(Graphics g) { - super.paintComponent(g); - g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), this); - g.setColor(new Color(243, 171, 115, 150)); - g.fillRect(0, 0, (getWidth() / 4) , getHeight()); - - g.drawImage(logo, 0, 0, (getWidth()/4) ,getHeight()/2,this); - } - public BtnPerso getResumeButton() { - return resumeButton; - } - - public BtnPerso getNewGameButton() { - return newGameButton; - } - -} - diff --git a/ancien/src/views/img/bg.png b/ancien/src/views/img/bg.png deleted file mode 100644 index e3621e8..0000000 Binary files a/ancien/src/views/img/bg.png and /dev/null differ diff --git a/bin/Main.class b/bin/Main.class deleted file mode 100644 index a964130..0000000 Binary files a/bin/Main.class and /dev/null differ diff --git a/bin/Music/Music/audio.wav b/bin/Music/Music/audio.wav deleted file mode 100644 index bcf85f8..0000000 Binary files a/bin/Music/Music/audio.wav and /dev/null differ diff --git a/bin/Music/audio.wav b/bin/Music/audio.wav deleted file mode 100644 index bcf85f8..0000000 Binary files a/bin/Music/audio.wav and /dev/null differ diff --git a/bin/controller/CameraController.class b/bin/controller/CameraController.class deleted file mode 100644 index c6c74a9..0000000 Binary files a/bin/controller/CameraController.class and /dev/null differ diff --git a/bin/controller/GameContext.class b/bin/controller/GameContext.class deleted file mode 100644 index c396d1e..0000000 Binary files a/bin/controller/GameContext.class and /dev/null differ diff --git a/bin/controller/GameController.class b/bin/controller/GameController.class deleted file mode 100644 index 22ffe0b..0000000 Binary files a/bin/controller/GameController.class and /dev/null differ diff --git a/bin/controller/HexagonMouseListener.class b/bin/controller/HexagonMouseListener.class deleted file mode 100644 index 120b69e..0000000 Binary files a/bin/controller/HexagonMouseListener.class and /dev/null differ diff --git a/bin/controller/MenuController.class b/bin/controller/MenuController.class deleted file mode 100644 index a0fdbcd..0000000 Binary files a/bin/controller/MenuController.class and /dev/null differ diff --git a/bin/controller/MouseDragHandler.class b/bin/controller/MouseDragHandler.class deleted file mode 100644 index 6c6bf0d..0000000 Binary files a/bin/controller/MouseDragHandler.class and /dev/null differ diff --git a/bin/controller/MousePressHandler.class b/bin/controller/MousePressHandler.class deleted file mode 100644 index 975a843..0000000 Binary files a/bin/controller/MousePressHandler.class and /dev/null differ diff --git a/bin/controller/MouseWheelController.class b/bin/controller/MouseWheelController.class deleted file mode 100644 index ab9b104..0000000 Binary files a/bin/controller/MouseWheelController.class and /dev/null differ diff --git a/bin/controller/NewListener.class b/bin/controller/NewListener.class deleted file mode 100644 index e69cb28..0000000 Binary files a/bin/controller/NewListener.class and /dev/null differ diff --git a/bin/controller/Point.class b/bin/controller/Point.class deleted file mode 100644 index d520349..0000000 Binary files a/bin/controller/Point.class and /dev/null differ diff --git a/bin/controller/QuiListener.class b/bin/controller/QuiListener.class deleted file mode 100644 index 180a921..0000000 Binary files a/bin/controller/QuiListener.class and /dev/null differ diff --git a/bin/controller/ResListener.class b/bin/controller/ResListener.class deleted file mode 100644 index aae19f1..0000000 Binary files a/bin/controller/ResListener.class and /dev/null differ diff --git a/bin/main/Main.class b/bin/main/Main.class deleted file mode 100644 index 8a61743..0000000 Binary files a/bin/main/Main.class and /dev/null differ diff --git a/bin/model/MenuModel.class b/bin/model/MenuModel.class deleted file mode 100644 index d332e94..0000000 Binary files a/bin/model/MenuModel.class and /dev/null differ diff --git a/bin/model/TerrainType.class b/bin/model/TerrainType.class deleted file mode 100644 index 0a2f465..0000000 Binary files a/bin/model/TerrainType.class and /dev/null differ diff --git a/bin/model/Tile.class b/bin/model/Tile.class deleted file mode 100644 index ac0f49e..0000000 Binary files a/bin/model/Tile.class and /dev/null differ diff --git a/bin/view/BtnPerso.class b/bin/view/BtnPerso.class deleted file mode 100644 index 7c192c5..0000000 Binary files a/bin/view/BtnPerso.class and /dev/null differ diff --git a/bin/view/ButtonHoverListener.class b/bin/view/ButtonHoverListener.class deleted file mode 100644 index 6315df6..0000000 Binary files a/bin/view/ButtonHoverListener.class and /dev/null differ diff --git a/bin/view/GameView.class b/bin/view/GameView.class deleted file mode 100644 index 825a6fa..0000000 Binary files a/bin/view/GameView.class and /dev/null differ diff --git a/bin/view/HexagonGridPanel.class b/bin/view/HexagonGridPanel.class deleted file mode 100644 index e682ddc..0000000 Binary files a/bin/view/HexagonGridPanel.class and /dev/null differ diff --git a/bin/view/HexagonTile$1.class b/bin/view/HexagonTile$1.class deleted file mode 100644 index bdd4171..0000000 Binary files a/bin/view/HexagonTile$1.class and /dev/null differ diff --git a/bin/view/HexagonTile.class b/bin/view/HexagonTile.class deleted file mode 100644 index 5d7f997..0000000 Binary files a/bin/view/HexagonTile.class and /dev/null differ diff --git a/bin/view/MenuView.class b/bin/view/MenuView.class deleted file mode 100644 index 42d460f..0000000 Binary files a/bin/view/MenuView.class and /dev/null differ diff --git a/bin/view/TileView$1.class b/bin/view/TileView$1.class deleted file mode 100644 index ad13987..0000000 Binary files a/bin/view/TileView$1.class and /dev/null differ diff --git a/bin/view/TileView.class b/bin/view/TileView.class deleted file mode 100644 index 609dff2..0000000 Binary files a/bin/view/TileView.class and /dev/null differ diff --git a/bin/view/img/D.png b/bin/view/img/D.png deleted file mode 100644 index 7dc4b96..0000000 Binary files a/bin/view/img/D.png and /dev/null differ diff --git a/bin/view/img/bg.png b/bin/view/img/bg.png deleted file mode 100644 index e3621e8..0000000 Binary files a/bin/view/img/bg.png and /dev/null differ diff --git a/bin/view/img/quit.png b/bin/view/img/quit.png deleted file mode 100644 index aa7b154..0000000 Binary files a/bin/view/img/quit.png and /dev/null differ