When Crabtree looks at the alternating letters and spaces, he remarks that it might make a wonderful game. He seems to be referring to 'Hangman."
When refers to singing pirates, he is obviously referring to the then popular "Pirates of Penzance" by Gilbert and Sullivan, which premiered in New York in 1879.
This episode takes place in 1895.