formatting and compiling
This commit is contained in:
BIN
Chess.class
BIN
Chess.class
Binary file not shown.
13
Chess.java
13
Chess.java
@@ -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) {
|
||||||
|
|
||||||
|
|||||||
BIN
Display.class
BIN
Display.class
Binary file not shown.
@@ -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
|
||||||
|
|||||||
BIN
Pawn.class
BIN
Pawn.class
Binary file not shown.
@@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user