Browse Source

Merge branch 'TikTakToeGame' into 'main'

Tik tak toe game into main

See merge request fdai7382/fertigjavagamelauncher!1
remotes/origin/textadventure
fdai7431 2 years ago
parent
commit
a15a6e0b3a
  1. 104
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/GamelauncherMain.java
  2. 0
      JavaGamelauncher/src/main/resources/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/Mouse3.gif
  3. 2
      README.md

104
JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/GamelauncherMain.java

@ -1,9 +1,16 @@
package de.hs_fulda.gruppenprojekt.JavaGamelauncher;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
@ -62,6 +69,103 @@ public class GamelauncherMain extends JFrame {//class
contentPane.setForeground(Color.GRAY);
contentPane.setBackground(Color.DARK_GRAY);
JButton btnSnake = new JButton("Snake Starten");
JButton btnMouse = new JButton("Mouse Starten");
JButton btnTikTakToe = new JButton("TikTakToe Starten");
JButton btnTextadventure = new JButton("Textadventure Starten");
btnSnake.setBackground(Color.PINK);
btnMouse.setBackground(Color.PINK);
btnTikTakToe.setBackground(Color.PINK);
btnTextadventure.setBackground(Color.PINK);
btnSnake.setFont(new Font("Consolas", Font.PLAIN, 12));
btnMouse.setFont(new Font("Consolas", Font.PLAIN, 12));
btnTikTakToe.setFont(new Font("Consolas", Font.PLAIN, 12));
btnTextadventure.setFont(new Font("Consolas", Font.PLAIN, 12));
btnSnake.setBounds(10, 500, 300, 25);
btnTikTakToe.setBounds(630, 500, 300, 25);
btnMouse.setBounds(320, 500, 300, 25);
btnTextadventure.setBounds(940, 500, 300, 25);
contentPane.add(btnSnake);
contentPane.add(btnMouse);
contentPane.add(btnTikTakToe);
contentPane.add(btnTextadventure);
btnSnake.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
//SnakeGame frameSnake = new SnakeGame();
//frameSnake.setVisible(true);
}
});
btnMouse.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
MouseGame frameMouse = new MouseGame();
//frameMouse.setVisible(true);
}
});
btnTikTakToe.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
//TikTakToeGame frameTikTakToe = new TikTakToeGame();
//frameTikTakToe.setVisible(true);
}
});
btnTextadventure.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
//TextadventureGame frameTextadventure = new TextadventureGame();
//frameTextadventure.setVisible(true);
}
});
JLabel AdSnake = new JLabel("");
JLabel AdMouse = new JLabel("");
JLabel AdTikTakToe = new JLabel("");
JLabel AdTextadventure = new JLabel("");
AdSnake.setForeground(Color.GRAY);
AdSnake.setBackground(Color.DARK_GRAY);
AdMouse.setForeground(Color.GRAY);
AdMouse.setBackground(Color.DARK_GRAY);
AdTikTakToe.setForeground(Color.GRAY);
AdTikTakToe.setBackground(Color.DARK_GRAY);
AdTextadventure.setBackground(Color.DARK_GRAY);
AdTextadventure.setForeground(Color.GRAY);
AdSnake.setBounds(10, 10, 300, 400);
AdMouse.setBounds(320, 10, 300, 400);
AdTikTakToe.setBounds(630, 10, 300, 400);
AdTextadventure.setBounds(940, 10, 300, 400);
AdSnake.setIcon(new ImageIcon(GamelauncherMain.class.getResource("/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/Snake3.gif")));
AdMouse.setIcon(new ImageIcon(GamelauncherMain.class.getResource("/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/Mouse3.gif")));
AdTikTakToe.setIcon(new ImageIcon(GamelauncherMain.class.getResource("/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/TikTakToe3.gif")));
AdTextadventure.setIcon(new ImageIcon(GamelauncherMain.class.getResource("/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/Textadventure3.gif")));
contentPane.add(AdSnake);
contentPane.add(AdMouse);
contentPane.add(AdTikTakToe);
contentPane.add(AdTextadventure);
}//end standardkonstruktor
}//end class

0
JavaGamelauncher/src/main/resources/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/maze.gif → JavaGamelauncher/src/main/resources/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/Mouse3.gif

Before

Width: 310  |  Height: 311  |  Size: 82 KiB

After

Width: 310  |  Height: 311  |  Size: 82 KiB

2
README.md

@ -15,7 +15,7 @@
### Bewertung:
- Noice Doice
- Noicer Doicer
#### Verlauf:

Loading…
Cancel
Save