[stdlib-sig] A game in the standard library

Yuval Greenfield ubershmekel at gmail.com
Sat Aug 18 22:28:44 CEST 2012


On Sat, Aug 18, 2012 at 11:32 AM, Mark Summerfield <list at qtrac.plus.com>wrote:

>
> I have Perl/Tk versions of snake and tetris that're ~1500 LOC. If I
> dropped the handling of options and made them all constants (board size,
> timing interval, board colors, etc.) that would take them down to ~950
> LOC.
>
> I would be happy to port one of them to Python/Tkinter and I'm pretty
> sure I could reduce the size even further without compromising on
> readability.
>
> I also have a Python/Tkinter version of tilefall (samegame) that's ~1200
> LOC, but again, if I made all the options constants & did some other
> simplifications to the GUI I could easily get that down to ~800 LOC or
> less.
>
> Or maybe the person who suggested adding a game to Tools/demo already
> has their own game in mind:-)
>
>
I don't know how'd we decide which game to include. Most things on these
lists are decided by popular vote or BDFL intervention. But perhaps we
should charter candidates from outside the mailing lists, it could be a fun
contest and publicity stunt.

I'd say under 1000 pep8 lines, and choose a winner or two by votes for
readability and fun by the mailing list frequenters or BDFL.

I say 1K as it shouldn't really be a full game with cinematic intro and
outro but more of a fun tech demo that a novice could wrap their head
around.

Yuval


p.s. concerning the snake - I have created a 2-player, 270 line, Tk version
https://github.com/ubershmekel/nibbles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/stdlib-sig/attachments/20120818/32bd4396/attachment.html>


More information about the stdlib-sig mailing list