On 21 December 2012 15:51, Graham Ashton <[email protected]> wrote:
> I fancied trying again with the heavily TDD'd approach that we didn't > quite finish last night, and came up with this: > > https://gist.github.com/4353577 > > Looks good to me! I also ran it with the iPad unfriendly bash test script I wrote at our meeting and it came through with flying colours. I couldn't resist trying to write a tennis scorer too seeing as I spent most of our meeting writing 15 lines of bash (which is quite productive for me and for bash). I found I could make the code a bit simpler by creating two separate point progressions, one where deuce was reached and one where it wasn't: https://gist.github.com/4364078 > Sorry about the 8 space indents, the new gists don't seem to play nicely > with text copied out of the Pythonista app (I'm still on my iPad…). > Very impressive app. iPad mini + Pythonista app + fold-out keyboard must be the smallest usable Python development hardware + software platform out there. > > It's shorter than I thought it should be. Have I missed a rule? > We did discuss the "player draws last breath in the middle of a game" rule, but I think we can leave that one out :) Best, Safe -- To post: [email protected] To unsubscribe: [email protected] Feeds: http://groups.google.com/group/python-north-west/feeds More options: http://groups.google.com/group/python-north-west
