ICE Out; Abolish ICE
This is a basic implementation of the NES game Bomberman, but it's missing a few things intentionally and they're left as further exploration for the reader.
| # | |
| # Hi all, | |
| # this is the Python code I used to make the visualization "Temperature circle" | |
| # (https://twitter.com/anttilip/status/892318734244884480). | |
| # Please be aware that originally I wrote this for my tests only so the | |
| # code was not ment to be published and is a mess and has no comments. | |
| # Feel free to improve, modify, do whatever you want with it. If you decide | |
| # to use the code, make an improved version of it, or it is useful for you | |
| # in some another way I would be happy to know about it. You can contact me | |
| # for example in Twitter (@anttilip). Unchecked demo data (no quarantees) |
ICE Out; Abolish ICE
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
| # Based on post from: https://snipt.net/chrisdpratt/symmetrical-manytomany-filter-horizontal-in-django-admin/#L-26 | |
| # Only reposting to avoid loosing it. | |
| """ | |
| When adding a many-to-many (m2m) relationship in Django, you can use a nice filter-style multiple select widget to manage entries. However, Django only lets you edit the m2m relationship this way on the forward model. The only built-in method in Django to edit the reverse relationship in the admin is through an InlineModelAdmin. | |
| Below is an example of how to create a filtered multiple select for the reverse relationship, so that editing entries is as easy as in the forward direction. | |
| IMPORTANT: I have no idea for what exact versions of Django this will work for, is compatible with or was intended for. |