Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'nested': 0.07; 'python': 0.09; 'boundaries': 0.09; 'dict': 0.09; 'keyed': 0.09; 'occasionally': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'slightly': 0.15; '10x10': 0.16; 'dojo,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'url:keywords': 0.16; 'url:sr': 0.16; 'board.': 0.17; 'implementing': 0.17; 'string,': 0.17; 'tim': 0.18; 'feb': 0.19; 'sort': 0.21; 'facility': 0.22; 'url:amazon': 0.22; 'url:utf8': 0.22; 'ourselves': 0.23; '(which': 0.26; 'question': 0.27; 'header:X-Complaints-To:1': 0.28; 'represent': 0.28; 'asks': 0.29; 'block,': 0.29; "i'm": 0.29; 'fri,': 0.30; 'lists': 0.31; 'implement': 0.32; 'url:home': 0.33; 'url:ie': 0.33; 'to:addr :python-list': 0.33; 'board': 0.35; 'received:org': 0.36; 'charset :us-ascii': 0.36; 'subject: (': 0.36; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'list,': 0.39; 'header:Received:5': 0.40; 'first': 0.61; 'more': 0.63; 'here': 0.65; 'gave': 0.65; 'subject:First': 0.65; 'monthly': 0.66; 'life': 0.66; '2013': 0.84; 'mechanics': 0.84; 'url:books': 0.84; '"how': 0.91; 'dennis': 0.91; 'favour': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: First attempt at a Python prog (Chess) Date: Fri, 15 Feb 2013 13:41:03 -0500 Organization: > Bestiaria Support Staff < References: <2013021323250974803-chrishinsley@gmailcom> <511E1DCB.40406@timgolden.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-102-210.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360953673 news.xs4all.nl 6948 [2001:888:2000:d::a6]:56776 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38945 On Fri, 15 Feb 2013 11:36:43 +0000, Tim Golden declaimed the following in gmane.comp.python.general: > > I'm laughing slightly here because, at the monthly London Python > Dojo, we often find ourselves implementing board-game mechanics > of one sort or another: Boggle, Battleships, Sliding block, > Connect 4, Noughts-and-Crosses, even things like Game of Life > (which has a board of sorts). > > And the "how shall we represent the board?" question is pretty > much the first thing any team asks themselves. And you always > get someone in favour of lists of lists, someone for one long > list, someone who likes a string, someone (me) who likes a sparse > dict keyed on coords, someone else likes nested defaultdicts, > and occasionally more outlandish schemes. > Ancient book http://www.amazon.com/Programming-Proverbs-Programmers-computer-programming/dp/0810458209/ref=sr_1_1?s=books&ie=UTF8&qid=1360953438&sr=1-1&keywords=0810458209 as I recall (mine is in a box at a storage facility 16 miles away) used a 10x10 board to implement a Checkers board. Since checkers move on the diagonal, it gave "overflow" guards on the boundaries and somehow made the addressing easier... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/