Comparing boards to check for move validity