Commit 54114b5f authored by hamed's avatar hamed

Fix Relative Path

parent 5aa08fcb
......@@ -41,31 +41,31 @@ public class ChessFrame extends JFrame implements MouseListener, MouseMotionList
try {
if (p.isWhite()) {
if (p instanceof Bishop) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_blt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_blt60.png"));
} else if (p instanceof King) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_klt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_klt60.png"));
} else if (p instanceof Knight) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_nlt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_nlt60.png"));
} else if (p instanceof Pawn) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_plt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_plt60.png"));
} else if (p instanceof Queen) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_qlt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_qlt60.png"));
} else if (p instanceof Rook) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_rlt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_rlt60.png"));
}
} else {
if (p instanceof Bishop) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_bdt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_bdt60.png"));
} else if (p instanceof King) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_kdt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_kdt60.png"));
} else if (p instanceof Knight) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_ndt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_ndt60.png"));
} else if (p instanceof Pawn) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_pdt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_pdt60.png"));
} else if (p instanceof Queen) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_qdt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_qdt60.png"));
} else if (p instanceof Rook) {
ret = ImageIO.read(new File("D:/University/MyCodes/Intellij/ChessProject/Chess/Chess_rdt60.png"));
ret = ImageIO.read(new File("./Chess/Chess_rdt60.png"));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment