samullen / acrosslite

A library for reading and parsing Acrosslite crossword files.
MIT License
10 stars 2 forks source link

Rows/columns swapped #1

Closed gwillen closed 12 years ago

gwillen commented 12 years ago

Hi! Thanks for creating this gem; it was a lifesaver for me. One bug: You have swapped the rows and columns, when reading them from the file. This means you misparse rectangular crosswords (square ones, which are almost all of them, are unaffected.)

See, e.g.:

http://code.google.com/p/puz/wiki/FileFormat

I'm slightly too lazy to make a pull request for such a small change -- just swap the constants COLUMNS and ROWS in acrosslite.rb.

For an example of a file on which this breaks, if you'd like one, see the New York Times crossword for June 22, 2011. (I can supply the file if you need it; to get it from the Times directly, you'll need a subscription.)

Thanks again!

samullen commented 12 years ago

I no longer have access to the crossword files I used to work with. If you could send me a rectangular file example that would help. If I'm going to change anything, I need to change the tests too.

samullen commented 12 years ago

I have the byte values for column/row switched and bumped the version number. I can't push this as a gem until I have tests which verify the changes.

I've gone ahead and pushed to GitHub, though.

gwillen commented 12 years ago

Hm, issues don't seem to allow attachments. How should I get you the file? It's 2.4k; it's the New York Times crossword for June 22, 2011. If you have gpg, here is a pastebin of it, encoded with gpg's ASCII armor -- use 'gpg --dearmor' to decode.

http://pastebin.com/WVKi3156 (will expire in 1 month)

If you don't have gpg handy, let me know how to send you the file.

Thanks for getting to this so quickly! :-)

samullen commented 12 years ago

Just send it to my email. samuel@samuelmullen.com

samullen commented 12 years ago

Just pushed v0.4.0 to Rubygems. Closing this.