diff --git a/src/model/Board.java b/src/model/Board.java index b87416a..c075539 100755 --- a/src/model/Board.java +++ b/src/model/Board.java @@ -62,6 +62,19 @@ public boolean equals(Board other) { return true; } + /** + * Generates the frontier. + * @param color The color of pieces to generate the frontier for. + * @return A list of possible "next moves" in the form of boards. + */ + public ArrayList generateFrontier(Color color) { + ArrayList from_jumps = generateJumpFrontier(color); + if(from_jumps.isEmpty()) { + return generateMoveFrontier(color); + } + return from_jumps; + } + /** * Print the current board representation */