> Date: Mon, 17 Jan 2011 11:51:16 -0500 > From: Brian Schott <[email protected]> > Subject: Re: [Jchat] rosetta code: child's game of honor. > To: Chat forum <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1 > > David, > > Having perused your code I am most impressed with its > organization and clarity. I have not executed the code but > have tried to understand and think I do. > I found one minor typo, I think. In the verb `go` your comment > refers to dealing 2 hands of 5 cards, not the 9 cards you deal. >
Comment adjusted. > I also was uncomfortable in the verb `go` with the very long > line. Could the spaces be removed from the line, at least? > Substituting ` for ^J in a rectangular region causes spaces. I like them, but recognize this may be a personal quirk. I removed the spaces. > After fumbling around a lot, I think I understand that the coding > of the states "... in base 0 as 0b[0-z] " is necessary to your > scheme so that the Agenda values can be computed. That > is very clever, but frankly I wish it could be avoided because > it makes the code so artificial looking, to me. Really, I like it, > but I hate it, too. > Any base will do simply because the "b" enables 36 characters per digit. In a draft I labeled the states a through y in an outline form and it was easier to change head of line to 1b (and to subtract 10 in the right place) than to renumber. In rewrite I changed the states to start from 0 and it occurred to me that base 0 would work. You can change that but I'm not going to. Thanks for looking! > Thanks for this work. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
