Chessboard bugfix
This commit is contained in:
parent
e6eecfd671
commit
6b20f36d15
|
@ -213,6 +213,7 @@ public class Chessboard extends JPanel {
|
|||
* @return piece
|
||||
*/
|
||||
public IPiece getPiece(PiecePosition pos) {
|
||||
if(pos.y < 0 || pos.y >= SQUARE_COUNT || pos.x < 0 || pos.x >= SQUARE_COUNT) return null;
|
||||
return pieces[pos.y][pos.x];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue