Update MachinePlayer.java 

Fixed isLegal bugs