added some checks for invalid move format

invalid format data is replaced with -1, forcing the move to be invalid