isValid and getDirection functions in Board.java

have not been able to test it since it is not connected to the visual
board just yet