forked from nicolashainak/Laby_Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal_fr.py
More file actions
58 lines (37 loc) · 1005 Bytes
/
global_fr.py
File metadata and controls
58 lines (37 loc) · 1005 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from value_player_widget import *
from laby_widget import *
#déclare une application par défaut
path = "share/laby/levels/"
laby = labyrinth("share/laby/levels/0.laby")
view = View(laby)
player=ValuePlayerWidget(view)
#Créer notre Laby grace a la fonction Laby appelée depuis l'utilisateur.
#Le string s attendu est uniquement le numéro ou nom précis du niveau.
def Laby(s):
global laby
global view
global player
laby = labyrinth(path+s+".laby")
view = View(deepcopy(laby))
player=ValuePlayerWidget(view)
return player
Exit=Tile(name="exit",char="x")
#Définition des fonctions pouvant être appelées par l'utilisateur.
def debut():
player.debut()
def avance():
player.avance()
def droite():
player.droite()
def gauche():
player.gauche()
def pose():
player.pose()
def prend():
player.prend()
def ouvre():
player.ouvre()
def regarde():
player.regarde()
def win():
player.win()