checks for forbidden moves