Initial commit
This commit is contained in:
18
Piece.java
Normal file
18
Piece.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user