instead , baseball probably evolved slowly during the 1830s and '40s from a game known as `` townball `` that was played in any number of cow pastures where men gathered with their bare hands and handlebar mustaches .