game: Added player actions

This commit is contained in:
2023-05-01 14:32:22 +10:00
parent 3307b01bf2
commit c37ee0c5f7
5 changed files with 203 additions and 18 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