Update Gameboard.java

inserted isValid and associated helpers