From: Matthew D Moss Date: 2005-04-15T12:39:35+09:00 Subject: Re: Knight's Travails (#27) > I couldn't decide if I thought this class was named correctly. It represents > a square or "tile" of the chess board, but when I think of a square it's as > a container for a piece. It was only four letters to type. :) > The 'a'[0] construct is a little unusual and I'm not sure why it's used here. > Most Ruby gurus just use ?a, which means the exact same thing. Well, I used 'a'[0] cause I'm still a Ruby-newbie. I was unaware of the ?a construct. > (Note that an Array could be used in place of the Hash, since the keys are > ordered numerical indexes.) Yeah, I noticed that only after looking at the code again a few days later. I think originally I had something else in mind, but in the end a simple array would have been sufficient.