moved legalMove to public interface