On Dec 20, 2006, at 4:10 PM, James Edward Gray II wrote:

> On Dec 18, 2006, at 7:11 AM, Morton Goldberg wrote:
>
>> Here is what it produces when given 519 as its argument:
>>
>> Initial position 519
>> rnbqkbnr
>> pppppppp
>> ........
>> ........
>> ........
>> ........
>> PPPPPPPP
>> RNBQKBNR
>
> But isn't the standard position 518?
>
> http://en.wikipedia.org/wiki/Chess960_Enumbering_Scheme

> On Dec 18, 2006, at 7:11 AM, Morton Goldberg wrote:
>
>>       q, @bishop_index = (number - 1).divmod 16
>
> I'm not sure why you subtract one here, but removing that seems to  
> put your solution inline with output of the others.

The answer to both questions is: I'm just being perverse. I decided  
to a use one-based numbering scheme, not a zero-based one, so the  
initial positions come out numbered 1 - 960. Look at the usage output  
in the rescue clause at the end of the script.

If I were to redo it, I would use the standard zero-based numbering.

Regards, Morton