Add functionality to display a chess board and pieces

Adds new Java files for Chess game logic, piece representation, and display initialization, along with imports for GUI and event handling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f6819c21-e85d-45ac-acde-604db2cfa4fe
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b3669ecc-6df5-4941-bb0c-6a0ed9bbd81e
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
CoolGuy27
2026-04-20 20:24:36 +00:00
parent 8a0b1beae9
commit ee04740fef
4 changed files with 124 additions and 0 deletions

18
Chess/Piece.java Normal file
View File

@@ -0,0 +1,18 @@
import java.awt.*;
import java.util.*;
public class Piece{
ArrayList<Integer> legalMoves;
int x,y;
Image sprite;
public Piece(int x, int y, Image sprite){
this.x = x;
this.y = y;
this.sprite = sprite;
}
public void draw(Graphics g){
g.drawImage(sprite,x * 40,y * 40,null);
}
}