fix merge conflict

cleanup
dstuck 2025-06-25 04:11:06 +02:00
parent 100cf4712c
commit 73768473e1
1 changed files with 47 additions and 87 deletions

View File

@ -225,10 +225,10 @@ public class SpielFrame extends JFrame {
this.setDefaultBackground();
}
/*
* Switches the button actions depending on the boardmode
*/
private void setButtonsActions() {
/*
* Switches the button actions depending on the boardmode
*/
public void setButtonsActions() {
List<Square> selectables;
@ -272,10 +272,10 @@ public class SpielFrame extends JFrame {
}
for (JButton b : buttons) {
panelLinks.add(b);
}
}
for (JButton b : buttons) {
panelLinks.add(b);
}
}
public void showWin(int player) {
JFrame frame = new JFrame("Result");
@ -283,20 +283,20 @@ public class SpielFrame extends JFrame {
frame.setSize(300, 150);
frame.setLayout(null);
JLabel jl = new JLabel(String.format("%d - %d", player / 2, player % 2));
jl.setBounds(50, 30, 200, 25);
jl.setFont(new Font("Tahoma", Font.BOLD, 20));
frame.add(jl);
frame.setVisible(true);
}
public void showResult(String res) {
ausgabe.setFont(new Font("Calibri", Font.BOLD, 40));
ausgabe.setForeground(new Color(178, 34, 34));
ausgabe.setText(" "+res);
}
JLabel jl = new JLabel(String.format("%d - %d", player / 2, player % 2));
jl.setBounds(50, 30, 200, 25);
jl.setFont(new Font("Tahoma", Font.BOLD, 20));
frame.add(jl);
frame.setVisible(true);
}
public void showResult(String res) {
ausgabe.setFont(new Font("Calibri", Font.BOLD, 40));
ausgabe.setForeground(new Color(178, 34, 34));
ausgabe.setText(" " + res);
}
public int showPromotion() {
final int[] result = { -1 };
@ -416,14 +416,14 @@ public class SpielFrame extends JFrame {
aufgebenUndo.add(Box.createHorizontalStrut(10));
aufgeben2 = new JButton("Aufgeben");
aufgeben2.setBackground(Color.LIGHT_GRAY);
aufgeben2.setForeground(Color.BLACK);
aufgeben2.setFont(new Font("Tahoma", Font.BOLD, 16));
aufgeben2.setAlignmentX(Component.CENTER_ALIGNMENT);
aufgeben2.addActionListener(new ButtonAufgebenListener(this, this.game));
aufgebenUndo.add(aufgeben2);
aufgeben2 = new JButton("Aufgeben");
aufgeben2.setBackground(Color.LIGHT_GRAY);
aufgeben2.setForeground(Color.BLACK);
aufgeben2.setFont(new Font("Tahoma", Font.BOLD, 16));
aufgeben2.setAlignmentX(Component.CENTER_ALIGNMENT);
aufgeben2.addActionListener(new ButtonAufgebenListener(this, this.game));
aufgebenUndo.add(aufgeben2);
aufgebenUndo.add(Box.createHorizontalStrut(10));
@ -524,14 +524,14 @@ public class SpielFrame extends JFrame {
aufgebenUndo.add(Box.createHorizontalStrut(10));
aufgeben = new JButton("Aufgeben");
aufgeben.setBackground(Color.LIGHT_GRAY);
aufgeben.setForeground(Color.BLACK);
aufgeben.setFont(new Font("Tahoma", Font.BOLD, 16));
aufgeben.setAlignmentX(Component.CENTER_ALIGNMENT);
aufgeben.addActionListener(new ButtonAufgebenListener(this, this.game));
aufgebenUndo.add(aufgeben);
aufgeben = new JButton("Aufgeben");
aufgeben.setBackground(Color.LIGHT_GRAY);
aufgeben.setForeground(Color.BLACK);
aufgeben.setFont(new Font("Tahoma", Font.BOLD, 16));
aufgeben.setAlignmentX(Component.CENTER_ALIGNMENT);
aufgeben.addActionListener(new ButtonAufgebenListener(this, this.game));
aufgebenUndo.add(aufgeben);
aufgebenUndo.add(Box.createHorizontalStrut(10));
@ -616,60 +616,20 @@ public class SpielFrame extends JFrame {
}
}
public JButton getAufgeben() {
return aufgeben;
}
public void setAufgeben(JButton aufgeben) {
this.aufgeben = aufgeben;
}
public JButton getAufgeben2() {
return aufgeben2;
}
public void setAufgeben2(JButton aufgeben2) {
this.aufgeben2 = aufgeben2;
}
public void setMode(BoardMode mode) {
this.mode = mode;
public JButton getAufgeben() {
return aufgeben;
}
/**
* Inverts the Enabled property of the controlpanelButtons
*/
public void enableControlPanelButtons() {
for (Component c : this.controlPanel.getComponents()) {
if (c instanceof JButton) {
c.setEnabled(!c.isEnabled());
}
}
public void setAufgeben(JButton aufgeben) {
this.aufgeben = aufgeben;
}
/**
* Adds the buttons to the boardpanel
*/
public void applyBoardButtons() {
for (JButton b : buttons) {
panelLinks.add(b);
}
public JButton getAufgeben2() {
return aufgeben2;
}
public JButton getAufgeben() {
return aufgeben;
}
public void setAufgeben(JButton aufgeben) {
this.aufgeben = aufgeben;
}
public JButton getAufgeben2() {
return aufgeben2;
}
public void setAufgeben2(JButton aufgeben2) {
this.aufgeben2 = aufgeben2;
}
public void setAufgeben2(JButton aufgeben2) {
this.aufgeben2 = aufgeben2;
}
}