feat: asset manager

This commit is contained in:
2025-04-06 12:58:47 +02:00
parent 6eae7e386f
commit 58cc9f3f17
3 changed files with 54 additions and 7 deletions

View File

@@ -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();
}
}
}
}