package project.chess; import java.awt.*; import java.util.ArrayList; import static project.ui.Display.loadImage; public class Bishop extends ChessPiece { private Image whiteBishop = loadImage("./resources/chess_piece_2_black_bishop.png"); private Image blackBishop = loadImage("./resources/chess_piece_2_white_bishop.png"); public Bishop(Board b, boolean isWhite, int x, int y) { super(b,isWhite,x,y); } public Image getImage(){ if (isWhite) return whiteBishop; return blackBishop; } @Override public ArrayList getMoves() { return new ArrayList(super.getDiagonalMoves(b.size())); } public Bishop clone () { return new Bishop(this.b,this.isWhite,this.x,this.y); } }