isValidMoves

added some code to isValidMoves, still working on checking flags