Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file modified Chess/bin/chess/Cell.class
Binary file not shown.
Binary file added Chess/bin/chess/Main$1.class
Binary file not shown.
Binary file added Chess/bin/chess/Main$Handler.class
Binary file not shown.
Binary file added Chess/bin/chess/Main$START.class
Binary file not shown.
Binary file added Chess/bin/chess/Main$SelectHandler.class
Binary file not shown.
Binary file added Chess/bin/chess/Main$TimeChange.class
Binary file not shown.
Binary file modified Chess/bin/chess/Main.class
Binary file not shown.
Binary file added Chess/bin/chess/Player.class
Binary file not shown.
Binary file modified Chess/bin/chess/Time$CountdownTimerListener.class
Binary file not shown.
Binary file modified Chess/bin/chess/Time.class
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added Chess/bin/chess/clash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chess/bin/chess/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Chess/bin/pieces/Bishop.class
Binary file not shown.
Binary file modified Chess/bin/pieces/King.class
Binary file not shown.
Binary file modified Chess/bin/pieces/Pawn.class
Binary file not shown.
Binary file removed Chess/bin/statistics/Player.class
Binary file not shown.
Binary file added Chess/src/chess/Black_Bishop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chess/src/chess/Black_King.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chess/src/chess/Black_Knight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chess/src/chess/Black_Pawn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chess/src/chess/Black_Queen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Chess/src/chess/Black_Rook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions Chess/src/chess/Cell.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,15 @@ public Cell(Cell cell) throws CloneNotSupportedException
public void setPiece(Piece p) //Function to inflate a cell with a piece
{
piece=p;
ImageIcon img=new javax.swing.ImageIcon(p.getPath());
ImageIcon img=new javax.swing.ImageIcon(this.getClass().getResource(p.getPath()));
content=new JLabel(img);
this.add(content);
}

public void removePiece() //Function to remove a piece from the cell
{
if (piece instanceof King)
{
piece=null;
this.remove(content);
}
else
{
piece=null;
this.remove(content);
}
}


Expand Down
Loading