3 ms·
Yeah, addictive it is. I remember last year contributing[1] to a 2048 python game, where the maintainer committed[2] test suite lengthy than my commit and He w
by pravj 12y ago
Yeah, addictive it is.
I remember last year contributing[1] to a 2048 python game, where the maintainer committed[2] test suite lengthy than my commit and He was doing it like a charm.
I think I should start from that very repository as I know it very well already.
1. https://github.com/bfontaine/term2048/commits?author=pravj https://github.com/bfontaine/term2048/commits?author=pravj
2. https://github.com/bfontaine/term2048/commit/6f9a46283c2cc0a2bf105f3e899e3f127d62610b https://github.com/bfontaine/term2048/commit/6f9a46283c2cc0a...
- abecedarius 12y agoThat looks good. For counterpoint, here is my 2048 including tests for just the tricky bit: https://github.com/darius/sturm/blob/master/2048.py https://github.com/darius/sturm/blob/master/2048.py I have Emacs set up to run them on a keypress without even having to save the file; you can create and run these tests even quicker than trying things out in a REPL, and unlike the REPL they persist to be rerun after the next change. If you've been feeling like testing is too much work, one angle is to reduce the amount of work it'll take to start.