Go to file
Gabriel Augendre 094f379397 Update 'LICENSE' 2022-01-02 19:24:44 +01:00
.gitignore Ignore .snake files 2018-04-29 20:58:58 +02:00
LICENSE Update 'LICENSE' 2022-01-01 22:27:52 +01:00
Pipfile Update Pipfile 2018-05-05 16:03:16 +02:00
Pipfile.lock Update Pipfile 2018-05-05 16:03:16 +02:00
README.adoc Add tkinter dependency in doc 2018-04-30 21:17:56 +02:00
config.py Allow score saving 2018-04-30 21:49:39 +02:00
main.py Hide scores window if no score 2018-05-07 08:56:19 +02:00
objects.py Separate score display from map 2018-04-30 20:57:24 +02:00
utils.py Add working snake 2018-04-29 11:20:05 +02:00

README.adoc

= Snake
Gabriel Augendre <gabriel@augendre.info>
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
:toc:

== Dependencies

- Python >= 3.6.5
- pygame >= 1.9.3
- tkinter (must be installed on system, see http://www.tkdocs.com/tutorial/install.html[the docs])
- pipenv (for dependencies management)

=== Install dependencies

----
pipenv install
----

== Run

----
pipenv run python main.py
----

== Config

You can change config values in `config.py`. Here are the defaults :

----
BACKGROUND_COLOR = 0, 0, 0
APPLE_COLOR = 250, 0, 0
SNAKE_COLOR = 0, 250, 0
FONT_COLOR = 250, 250, 250

MAP_SIZE = 41, 31
TILE_SIZE = 20
RESOLUTION = MAP_SIZE[0] * TILE_SIZE, MAP_SIZE[1] * TILE_SIZE

INITIAL_SNAKE_SIZE = 3
----

WARNING: Don't change `RESOLUTION` unless you know what you're doing.
`RESOLUTION` is currently automatically computed from the map size.

== Roadmap
- [ ] Add custom maps