

Python – Lightweight snake game running in the console - Kanse
https://github.com/tancredi/python-console-snake

======
vkjv
Nice work! IMHO, Snake is one of the best games to get your feet wet
programming. I have very fond memories of writing a snake game on the TI-83.
IIRC, my event loop was so slow that I didn't even need any wait states to
make the game playable.

------
Tankenstein
Excellent! Just as a tip, when writing curses it's best to run everything in a
curses wrapper, so wrap your main function in curses.wrapper(main) basically.
If you don't do so, crashing messes up the terminal.

------
coreyja
Not working for me in OSX 10.10. Here is a PasteBin of the error I'm getting.
[http://pastebin.com/CicWMAc2](http://pastebin.com/CicWMAc2)

~~~
tancredi
Try to use with maximised window - it's a bug that happens when trying to draw
on a window that's too small

~~~
johnmaguire2013
Regarding this, does anyone have tips on how best to do curses layouts that
support different window sizes? I'm working on a procedurally generated
console game in my free time, using Python + curses, and this is an issue I
run into as well.

I've been considering taking some time to try to write some sort of "fluid" or
"dynamic" layout framework for curses (i.e. specify percents for width /
height, and have it automatically expand). Seems like a giant pain though...

------
ben174
Since this is a snake game, and it's python, you really should switch to
snake_case rather than camelCase :)

------
stillsut
Doesn't work on windows -

    
    
        ImportError: No module name fcntl

