DraftKings and FanDuel were ordered to stop accepting bets in New York as the attorney general said their games constituted illegal gambling under state law.