feat: asset manager
This commit is contained in:
@@ -4,6 +4,7 @@ import java.awt.Color;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.JButton;
|
||||
@@ -127,7 +128,11 @@ public class Window extends JFrame implements OutputSystem {
|
||||
for (int y = 0; y < 8; y++) {
|
||||
for (int x = 0; x < 8; x++) {
|
||||
JLabel cell = this.cells[x][y];
|
||||
cell.setIcon(pieceIcon.getIcon(pieceAt(x, y)));
|
||||
try {
|
||||
cell.setIcon(pieceIcon.getIcon(pieceAt(x, y)));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user