This commit is contained in:
Immanuel Alvaro Bhirawa
2023-05-01 15:19:25 +10:00
5 changed files with 291 additions and 106 deletions

View File

@@ -394,6 +394,18 @@ public class State {
}
}
/**
* Is move valid?
* @param coord Coord coordinate to place piece
* @param type char type of piece
* @return boolean true if move is valid
*/
public boolean isMoveValid(Coord coord, char type){
// Create moveString
String moveString = type + " " + coord.toString();
return BlueLagoon.isMoveValid(this.toString(), moveString);
}
/**
* is the phase over?
* Defaults to simple mode