formatting and compiling
This commit is contained in:
30
Piece.java
30
Piece.java
@@ -1,18 +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);
|
||||
}
|
||||
}
|
||||
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