-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
51 lines (47 loc) · 1.02 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
def on_button_pressed_a():
global LvlSelector
if B == 1:
LvlSelector += -1
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_ab():
global A
if A == 0:
A = 0
if LvlSelector == 1:
StartLvl(1)
if LvlSelector == 2:
StartLvl(2)
input.on_button_pressed(Button.AB, on_button_pressed_ab)
def on_button_pressed_b():
global LvlSelector
if B == 1:
LvlSelector += 1
input.on_button_pressed(Button.B, on_button_pressed_b)
def StartLvl(Number2: number):
global B, Player
B = 0
if Number2 == 1:
Player = game.create_sprite(1, 3)
basic.show_leds("""
. . . . .
. . . . .
. . . . .
. . . . .
# # # # #
""")
Player: game.LedSprite = None
B = 0
A = 0
LvlSelector = 0
LvlSelector = 1
basic.show_leds("""
# # # . .
# # # # .
# # # # #
# # # # .
# # # . .
""")
A = 1
def on_forever():
pass
basic.forever(on_forever)