Started making changes to JoinGame etc.
This commit is contained in:
parent
0ef34e18eb
commit
7a9b70c271
|
@ -1,5 +1,14 @@
|
|||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
/*
|
||||
TODO: evtl an Lucas: die "JoinGame" muss noch informationen erhalten, welche Spieler erstellt wurden und welches Semester
|
||||
Also die startMultiplayerGame muss JoinGame mit parametern für (HumanPlayer/AiEasy/AiNormal/AiHard, Semesteranzahl, Spielername) (3 Parameter) erhalten
|
||||
|
||||
*/
|
||||
|
||||
|
||||
public class JoinGame extends JPanel {
|
||||
ImageIcon backButtonIcon = new ImageIcon("graphics/backButton.png");
|
||||
|
@ -51,5 +60,19 @@ public class JoinGame extends JPanel {
|
|||
|
||||
backButton.addActionListener(e -> frame.showPanel("MultiplayerGame"));
|
||||
losButton.addActionListener(e -> frame.showPanel("Verbinden"));
|
||||
/*
|
||||
losButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
frame.showPanel("Verbinden");
|
||||
//public static void startOnlineGame(Class<? extends LocalPlayer> localPlayerClass, String localPlayerName, InetSocketAddress
|
||||
// address, int size) throws IOException {
|
||||
if(playerType == 1) { //Beispiel (für playertape wäre z.B. 1 humanPlayer etc.)
|
||||
GameController.startOnlineGame(HumanPlayer.class, playerName, adress); //
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
|
@ -154,6 +154,7 @@ public class startLocalGame extends JPanel {
|
|||
updateTextFields();
|
||||
}
|
||||
});
|
||||
|
||||
backButton.addActionListener(e -> frame.showPanel("MainMenu"));
|
||||
testButton.addActionListener(e -> frame.showPanelSLG("GameBoard",1,p1,p2));
|
||||
//startButton.addActionListener(e -> frame.showPanelSLG("GameBoard", semesterCounter,p1, p2)); // TODO ECHTE FUNKTION EINFÜGEN
|
||||
|
@ -161,7 +162,7 @@ public class startLocalGame extends JPanel {
|
|||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
frame.showPanelSLGLS("startLocalGameLoadingScreen", semesterCounter); //TODO
|
||||
if (leftPlayerIcon.getIcon() == humanPlayerIcon) {// TODO Diverse KiIcons erstellen für diffs
|
||||
if (leftPlayerIcon.getIcon() == humanPlayerIcon) {// TODO Wird name wirklich weitergegeben?
|
||||
if (rightPlayerIcon.getIcon() == aiPlayerEasyIcon) {
|
||||
GameController.startLocalGame(HumanPlayer.class, leftPlayerNickname, SpecificAiPlayerEasy.class, GameController.semesterToBoardSize(semesterCounter));
|
||||
} else if (rightPlayerIcon.getIcon() == aiPlayerNormalIcon) {
|
||||
|
|
Loading…
Reference in New Issue