Skip to content

Commit eca833f

Browse files
committed
Changed tkinter to kivy. Created app architecture layers
1 parent 4446076 commit eca833f

22 files changed

+805
-296
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.pyc
22
__pycache__
33
snake_env
4+
snakegameenv/
45
.idea/workspace.xml
56
.idea/tasks.xml
67
bin

README.md

+90
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,93 @@ Double press makes the snake to speed up.
1717
Used libraries:
1818
- pygame
1919
- tkinter
20+
21+
22+
## Setup
23+
24+
Pre-requirements:
25+
26+
* python 3.9 >
27+
* virtualenv
28+
29+
Install virtualenv
30+
31+
```shell
32+
pip install virtualenv
33+
```
34+
35+
On Windows OS you need to add virtualenv installation path into
36+
PATH environment variable of the system.
37+
[Example tutorial on that](https://linuxhint.com/activate-virtualenv-windows/)
38+
39+
40+
41+
## Virtual Environment
42+
43+
### If you would like to use **virtualenv**
44+
Create virtual environment.
45+
From the root directory run.
46+
47+
```shell
48+
virtualenv snakegameenv
49+
```
50+
51+
where "snakegameenv" is the custom name of the environment
52+
53+
Activate the environment
54+
55+
On Windows you need this command:
56+
57+
```shell
58+
<environment name>\Scripts\activate
59+
```
60+
61+
in our case:
62+
63+
```shell
64+
snakegameenv\Scripts\activate
65+
```
66+
67+
On Unix system
68+
69+
```shell
70+
source snakegameenv/bin/activate
71+
```
72+
73+
**Install requirements**
74+
75+
```shell
76+
pip install -r requirements.txt
77+
```
78+
79+
### Instead of virtualenv you can use **conda**
80+
81+
Create and activate environment:
82+
83+
```shell
84+
conda create --name Snake-Pygame python=3.10
85+
conda activate Snake-Pygame
86+
```
87+
88+
Install packages:
89+
90+
```shell
91+
conda install --file requirements.txt
92+
```
93+
94+
### Before commit
95+
96+
Save all installed packages to the list of requirements:
97+
98+
With pip
99+
```shell
100+
pip freeze > requirements.txt
101+
```
102+
103+
With conda
104+
105+
```shell
106+
conda list --export > requirements.txt
107+
```
108+
109+

main.py

-175
This file was deleted.

requirements.txt

+92-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,92 @@
1-
pygame==2.1.2
1+
# This file may be used to create an environment using:
2+
# $ conda create --name <env> --file <this file>
3+
# platform: osx-64
4+
aom=3.5.0=hf0c8a7f_0
5+
bzip2=1.0.8=h1de35cc_0
6+
ca-certificates=2022.12.7=h033912b_0
7+
cairo=1.16.0=h297c08e_1015
8+
certifi=2022.12.7=pyhd8ed1ab_0
9+
dav1d=1.0.0=hac89ed1_1
10+
distlib=0.3.6=pypi_0
11+
docutils=0.19=py310h2ec42d9_1
12+
expat=2.5.0=hf0c8a7f_1
13+
filelock=3.11.0=pypi_0
14+
fluidsynth=2.3.2=h75b786d_0
15+
font-ttf-dejavu-sans-mono=2.37=hab24e00_0
16+
font-ttf-inconsolata=3.000=h77eed37_0
17+
font-ttf-source-code-pro=2.038=h77eed37_0
18+
font-ttf-ubuntu=0.83=hab24e00_0
19+
fontconfig=2.14.2=h5bb23bf_0
20+
fonts-conda-ecosystem=1=0
21+
fonts-conda-forge=1=0
22+
freetype=2.12.1=h3f81eb7_1
23+
gettext=0.21.1=h8a4c099_0
24+
glib=2.74.1=hbc0c0cd_1
25+
glib-tools=2.74.1=hbc0c0cd_1
26+
graphite2=1.3.13=h2e338ed_1001
27+
gst-plugins-base=1.22.0=h37e1711_2
28+
gstreamer=1.22.0=h1d18e73_2
29+
harfbuzz=6.0.0=hc28939c_1
30+
icu=72.1=h7336db1_0
31+
kivy=2.1.0=py310he93d8b2_4
32+
lame=3.100=hb7f2c08_1003
33+
lcms2=2.15=h2dcdeff_1
34+
lerc=4.0.0=hb486fe8_0
35+
libavif=0.11.1=he9a59b1_0
36+
libcxx=16.0.1=h71dddab_0
37+
libdeflate=1.18=hac1461d_0
38+
libexpat=2.5.0=hf0c8a7f_1
39+
libffi=3.4.2=hecd8cb5_6
40+
libflac=1.4.2=hf0c8a7f_0
41+
libglib=2.74.1=h4c723e1_1
42+
libiconv=1.17=hac89ed1_0
43+
libjpeg-turbo=2.1.5.1=hb7f2c08_0
44+
libmad=0.15.1b=hb7f2c08_1001
45+
libogg=1.3.4=h35c211d_1
46+
libopus=1.3.1=hc929b4f_1
47+
libpng=1.6.39=ha978bb4_0
48+
libsndfile=1.2.0=h591af1c_0
49+
libtiff=4.5.0=hedf67fa_6
50+
libvorbis=1.3.7=h046ec9c_0
51+
libwebp-base=1.3.0=hb7f2c08_0
52+
libxcb=1.13=h0d85af4_1004
53+
libzlib=1.2.13=hfd90126_4
54+
mpg123=1.31.3=hf0c8a7f_0
55+
mypy=1.2.0=pypi_0
56+
mypy-extensions=1.0.0=pypi_0
57+
ncurses=6.4=hcec6c5f_0
58+
openjpeg=2.5.0=h13ac156_2
59+
openssl=1.1.1t=hfd90126_0
60+
opusfile=0.12=hc97edf9_2
61+
pcre2=10.40=h1c4e4bc_0
62+
pillow=9.5.0=py310h6b2f720_0
63+
pip=23.1=pypi_0
64+
pixman=0.40.0=hbcb3906_0
65+
platformdirs=3.2.0=pypi_0
66+
portaudio=19.6.0=hf0c8a7f_7
67+
portmidi=2.0.4=h5095954_0
68+
pthread-stubs=0.4=hc929b4f_1001
69+
pygame=2.3.0=py310h8c3c4e7_0
70+
pygments=2.15.0=pyhd8ed1ab_0
71+
pyqt6-qt6=6.5.0=pypi_0
72+
pyqt6-sip=13.5.0=pypi_0
73+
python=3.10.10=h218abb5_2
74+
python_abi=3.10=2_cp310
75+
readline=8.2=hca72f7f_0
76+
sdl2=2.26.5=hf0c8a7f_0
77+
sdl2_image=2.6.3=h5d7643b_1
78+
sdl2_mixer=2.6.3=ha552b2f_0
79+
sdl2_ttf=2.20.2=h7bafa26_0
80+
setuptools=67.6.1=pypi_0
81+
sqlite=3.41.2=h6c40b1e_0
82+
tk=8.6.12=h5d9f67b_0
83+
tomli=2.0.1=pypi_0
84+
typing-extensions=4.5.0=pypi_0
85+
tzdata=2023c=h04d1e81_0
86+
virtualenv=20.21.0=pypi_0
87+
wheel=0.38.4=py310hecd8cb5_0
88+
xorg-libxau=1.0.9=h35c211d_0
89+
xorg-libxdmcp=1.1.3=h35c211d_0
90+
xz=5.2.10=h6c40b1e_1
91+
zlib=1.2.13=hfd90126_4
92+
zstd=1.5.2=hbc0c0cd_6

src/__init__.py

Whitespace-only changes.

src/adapters/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)