-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
29 lines (23 loc) · 860 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
SnownyPython - Python maze game with Turtle module
Author: Jimmy F.
Date: 23/03/2021
Version: 0.1
This class allows to execute the game
Usage:
You have nothing to do but launch the file to play!
Enter:
The Character class
Results:
The game
"""
from Character import *
if __name__ == "__main__": #Is used to execute some code only if the file was run directly, and not imported.
listen() #Allows you to listen to what the player is going to type on his keyboard
#Definition of keys with movement functions
onkeypress(deplacer_gauche, "Left")
onkeypress(deplacer_droite, "Right")
onkeypress(deplacer_haut, "Up")
onkeypress(deplacer_bas, "Down")
mainloop() #Tells the window to wait for the user to do something,
#although in this case there’s not much for the user to do except close the window