Add some testing in attemptMove method to filter illegal moves.