Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hummel009 committed Apr 27, 2024
1 parent aeeb555 commit 35e0ce8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GUI : JFrame() {
init {
title = "Hummel009's Chess Launcher"
defaultCloseOperation = EXIT_ON_CLOSE
setBounds(100, 100, 450, 150)
setBounds(100, 100, 550, 200)

val panelContent = JPanel()
panelContent.border = EmptyBorder(5, 5, 5, 5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object UtilBoard {
val imagePath = "img/" + if (pieceType == null) {
"transparent.png"
} else {
if (team === PieceTeams.BLACK) "black" else "white" + when (pieceType) {
(if (team == PieceTeams.BLACK) "black" else "white") + when (pieceType) {
PieceTypes.BISHOP -> "_bishop.png"
PieceTypes.KING -> "_king.png"
PieceTypes.QUEEN -> "_queen.png"
Expand All @@ -33,7 +33,6 @@ object UtilBoard {
try {
val imageStream = GUI::class.java.getResourceAsStream("/$imagePath")
val originalImage = ImageIO.read(imageStream)
println(originalImage)
return ImageIcon(originalImage)
} catch (ex: IOException) {
Logger.getLogger(UtilBoard::class.java.name).log(Level.SEVERE, null, ex)
Expand Down

0 comments on commit 35e0ce8

Please sign in to comment.