Merge branch 'master' of https://gitlab.cecs.anu.edu.au/u7156831/comp1110-ass2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user