mirror of
https://github.com/lov3b/Schack.git
synced 2025-12-14 16:20:06 +01:00
Some edits from last lesson + own edits
This commit is contained in:
28
src/schack/Pawn.java
Normal file
28
src/schack/Pawn.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package schack;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
public class Pawn extends Piece {
|
||||
|
||||
public Pawn(boolean isWhite, Point startingPosition) throws IOException {
|
||||
super(isWhite, startingPosition);
|
||||
setPieceIcon("Pawn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedHashSet<Point> validMoves(Piece[][] pieces) {
|
||||
|
||||
return new LinkedHashSet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void move(Piece[][] pieces) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Pawn{" + "position=" + position + ", isWhite=" + isWhite + '}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user