added rook, created bishop file
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
|
||||
public class Piece {
|
||||
ArrayList<Integer> legalMoves;
|
||||
public abstract class Piece {
|
||||
Position pos;
|
||||
Image sprite;
|
||||
String color;
|
||||
@@ -17,10 +16,7 @@ public class Piece {
|
||||
g.drawImage(sprite, pos.x * 40, pos.y * 40, null);
|
||||
}
|
||||
|
||||
public ArrayList<Position> getLegalMoves(Board board) {
|
||||
System.out.println("parent method not overriden");
|
||||
return null;
|
||||
}
|
||||
public abstract ArrayList<Position> getLegalMoves(Board board);
|
||||
|
||||
public boolean colorMatches(Piece p) {
|
||||
return this.color.equals(p.color);
|
||||
|
||||
Reference in New Issue
Block a user