diff --git a/src/schack/Horse.java b/src/schack/Horse.java index 580b919..92d318d 100644 --- a/src/schack/Horse.java +++ b/src/schack/Horse.java @@ -2,6 +2,7 @@ package schack; import java.awt.Point; import java.io.IOException; +import static java.lang.Math.abs; import java.util.LinkedHashSet; public class Horse extends Piece { @@ -15,6 +16,17 @@ public class Horse extends Piece { public LinkedHashSet validMoves(Piece[][] pieces, boolean isSelected) { LinkedHashSet movable = new LinkedHashSet<>(); + // TODO: Integrera + /* + for (int dx : new int[]{-2, -1, 1, 2}) { + for (int y = -1; y <= 1; y += 2) { + int dy = y * (3 - abs(dx)); + + } + } + */ + + // Postitioner att checka Point[] positions = { // Snett höger uppåt