NNTP-Posting-Date: Wed, 13 Feb 2013 19:31:59 -0600 From: Chris Hinsley Newsgroups: comp.lang.python Date: Thu, 14 Feb 2013 01:31:59 +0000 Message-ID: <2013021401315964158-chrishinsley@gmailcom> References: <2013021323250974803-chrishinsley@gmailcom> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: First attempt at a Python prog (Chess) User-Agent: Unison/2.1.10 Lines: 29 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-DwUkmBawr0DKtZZXKImKd04Rc8G9gqy/4jHQM28RNVCcUurDtMOEnvQEDZZKflBmWSz1SMi4VRDDgBR!piNYE96nzEL7t52hSZbEoEsCDhGOPIU64SbTkE7qeqrkKHrF7app8avx1D63ucirHYyliHOw X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2105 Path: csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!news.giganews.com.POSTED!not-for-mail Xref: csiph.com comp.lang.python:38837 On 2013-02-13 23:55:20 +0000, Oscar Benjamin said: > On 13 February 2013 23:25, Chris Hinsley wrote: >> New to Python, which I really like BTW. > > Glad to hear it. > >> First serious prog. Hope you like it. I know it needs a 'can't move if your >> King would be put into check' test. But the weighted value of the King piece >> does a surprising emergent job. > [SNIP program] > > Your program looks good. Were you looking for feedback (I'm sure > someone would give some if so)? > > > Oscar I suppose so yes. I was just 'putting it out there' to see if it was interesting/useful to anyone. No doubt there are many Python features I could use to improve on this. First thing that occurred to me on deciding to try Python was the idea of Generator functions to enumerate all the possible moves of a Chess game, and that 'yield' would make the prog relatively compact. I wish Shedskin could cope with them ! PyPy runs it OK. Chris