Added move validation so can only enter legal moves