Skip to content
Snippets Groups Projects
Commit 69f8b2b2 authored by ACIKBAS TUNA's avatar ACIKBAS TUNA
Browse files

King class creation

- missing movements
parent 259fcbda
2 merge requests!2King class creation,!1King class creation
package model;
import java.util.ArrayList;
public class Pawn extends Piece {
public Pawn(Position p, int color) {
super(p, color);
}
public ArrayList<Position> getAvailableMoves(Board b) {
// creates a dynamic list of available moves
ArrayList<Position> moves = new ArrayList<Position>();
Position arrival;
if(color == Piece.WHITE) { // black and white have an opposite direction behavior
// King white move
}
else {
// King black move
}
return moves;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment