Changed implementation of isValidMove in MachinePlayer.java