formatting and compiling

This commit is contained in:
Cool Guy
2026-04-21 16:20:03 +00:00
parent 76c4dea36a
commit 94e4377364
7 changed files with 103 additions and 106 deletions

Binary file not shown.

View File

@@ -1,10 +1,9 @@
import java.util.ArrayList;
import java.awt.*; import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.awt.Color; import java.awt.Color;
import java.awt.event.*;
import java.util.ArrayList;
import javax.swing.*;
import javax.swing.border.*;
public class Chess extends JPanel implements ActionListener { public class Chess extends JPanel implements ActionListener {
@@ -42,9 +41,7 @@ public class Chess extends JPanel implements ActionListener{
repaint(); repaint();
} }
public void gameLoop(){ public void gameLoop() {}
}
public void draw(Graphics g) { public void draw(Graphics g) {

Binary file not shown.

View File

@@ -7,6 +7,7 @@ public class Display {
int boardHeight = 400; int boardHeight = 400;
JFrame game = new JFrame(); JFrame game = new JFrame();
game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
game.setSize(boardWidth, boardHeight); game.setSize(boardWidth, boardHeight);
game.setVisible(true); game.setVisible(true);
game.setLocationRelativeTo(null); game.setLocationRelativeTo(null);
@@ -19,5 +20,5 @@ public class Display {
} }
} }
// images :
//images : https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQN6qOyhiUDLlTlwl19PaMTeiY5rSOqkUqu-g&s // https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQN6qOyhiUDLlTlwl19PaMTeiY5rSOqkUqu-g&s

Binary file not shown.

View File

@@ -3,8 +3,7 @@ import javax.swing.ImageIcon;
public class Pawn extends Piece { public class Pawn extends Piece {
public Pawn(int x, int y, String color) { public Pawn(int x, int y, String color) {
super(x,y,new ImageIcon("Sprites/" + color + "/Pawn.png").getImage()); super(x, y, new ImageIcon("Sprites/" + color + "/pawn.png").getImage());
} }
} }