From 593ae9901ae70ac28e05bb23f5482208d6040b01 Mon Sep 17 00:00:00 2001 From: Emre Durak <3012346@stud.hs-mannheim.de> Date: Fri, 20 Dec 2024 14:14:52 +0100 Subject: [PATCH] git test --- .../pr2projekt/domain/HitoriMain.java | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/PR2Projekt/src/de/hs_mannheim/informatik/pr2projekt/domain/HitoriMain.java b/PR2Projekt/src/de/hs_mannheim/informatik/pr2projekt/domain/HitoriMain.java index a1ba9d4..970464d 100644 --- a/PR2Projekt/src/de/hs_mannheim/informatik/pr2projekt/domain/HitoriMain.java +++ b/PR2Projekt/src/de/hs_mannheim/informatik/pr2projekt/domain/HitoriMain.java @@ -103,63 +103,6 @@ public class HitoriMain extends JFrame implements AcrtionListener{ return pos; } - public static void backOneStep(Stack movesMade, JButton[][] buttons, String[][] colors, JPanel grid){ - try { - String move = movesMade.pop(); - String[] line = move.split("\\."); - String y = line[0]; - String x = line[1]; - String color = line[2]; - if(color.equals("W")){ - int i = Integer.parseInt(y); - int j = Integer.parseInt(x); - JButton b0 = buttons[i][j]; - b0.setOpaque(true); - b0.setForeground(Color.WHITE); - b0.setContentAreaFilled(true); - b0.setBorderPainted(false); - b0.setFocusPainted(false); - b0.setBackground(Color.BLACK); - buttons[i][j] = b0; - String str = colors[i][j]; - String str0 = str.substring(0, str.length() - 1); - colors[i][j] = str0; - grid.repaint(); - gridUpdate(grid, buttons); - }else if(color.equals("G")){ - int i = Integer.parseInt(y); - int j = Integer.parseInt(x); - JButton b0 = buttons[i][j]; - b0.setOpaque(true); - b0.setForeground(Color.BLACK); - b0.setContentAreaFilled(true); - b0.setBorderPainted(false); - b0.setFocusPainted(false); - b0.setBackground(Color.WHITE); - buttons[i][j] = b0; - String str = colors[i][j]; - String str0 = str.substring(0, str.length() - 1); - colors[i][j] = str0; - gridUpdate(grid, buttons); - } else if(color.equals("B")){ - int i = Integer.parseInt(y); - int j = Integer.parseInt(x); - JButton b0 = buttons[i][j]; - b0.setOpaque(true); - b0.setForeground(Color.BLACK); - b0.setContentAreaFilled(true); - b0.setBorderPainted(false); - b0.setFocusPainted(false); - b0.setBackground(Color.lightGray); - buttons[i][j] = b0; - String str = colors[i][j]; - String str0 = str.substring(0, str.length() - 1); - colors[i][j] = str0; - gridUpdate(grid, buttons); - } - } catch(EmptyStackException e) {} - } - public static void totalResetButton(JButton[][] buttons, String[][] colors,Stack madeMoves,String[][] data){ madeMoves.clear(); for(int i = 0; i