1919led2 .write_digital (1 )
2020
2121import display
22-
2322Image = display .Image
2423display = display .Display ()
2524
26- display .clear ()
27-
28- all_boats = [
29- Image ("00000:" "00000:" "00000:" "00000:" "00000" ),
30- Image ("11111:" "00000:" "00000:" "00000:" "00000" ),
31- Image ("11111:" "11111:" "00000:" "00000:" "00000" ),
32- Image ("11111:" "11111:" "11111:" "00000:" "00000" ),
33- Image ("11111:" "11111:" "11111:" "11111:" "00000" ),
34- Image ("11111:" "11111:" "11111:" "11111:" "11111" ),
35- Image ("00000:" "11111:" "11111:" "11111:" "11111" ),
36- Image ("00000:" "00000:" "11111:" "11111:" "11111" ),
37- Image ("00000:" "00000:" "00000:" "11111:" "11111" ),
38- Image ("00000:" "00000:" "00000:" "00000:" "11111" ),
39- Image ("00000:" "00000:" "00000:" "00000:" "00000" ),
40- ]
41-
42- display .show (all_boats , color = (10 , 10 , 10 ), delay = 150 )
43-
44- led1 .write_digital (0 )
45- led2 .write_digital (0 )
46-
25+ time .sleep (0.5 )
4726music .play (music .JUMP_UP )
4827display .show ('A' , color = (20 , 0 , 0 ))
4928while 0 == button_a .was_pressed ():
5029 time .sleep (0.1 )
5130time .sleep (0.5 )
5231display .show ('O' , color = (0 , 20 , 0 ))
5332
54- music .play (music .JUMP_UP )
55- display .show ('B' , color = (20 , 0 , 0 ))
56- while 0 == button_b .was_pressed ():
57- time .sleep (0.1 )
5833time .sleep (0.5 )
59- display .show ('O' , color = (0 , 20 , 0 ))
34+ music .play (music .JUMP_UP )
35+ display .show ('D' , color = (20 , 0 , 0 ))
36+ display .clear ()
37+ time .sleep (1 )
38+ display .show (Image ("33333:" "33333:" "33333:" "33333:" "33333" ), color = (10 , 0 , 0 ), delay = 150 )
39+ time .sleep (1 )
40+ display .show (Image ("33333:" "33333:" "33333:" "33333:" "33333" ), color = (0 , 10 , 0 ), delay = 150 )
41+ time .sleep (1 )
42+ display .show (Image ("33333:" "33333:" "33333:" "33333:" "33333" ), color = (0 , 0 , 10 ), delay = 150 )
43+ time .sleep (1 )
44+ display .show (Image ("33333:" "33333:" "33333:" "33333:" "33333" ), color = (10 , 10 , 10 ), delay = 150 )
45+ time .sleep (1 )
46+ display .clear ()
47+
48+ led1 .write_digital (0 )
49+ led2 .write_digital (0 )
6050
6151music .play (music .JUMP_UP )
6252display .show ('T' , color = (20 , 0 , 0 ))
9787 break
9888display .show ('O' , color = (0 , 20 , 0 ))
9989
90+ music .play (music .JUMP_UP )
91+ display .show ('B' , color = (20 , 0 , 0 ))
92+ while 0 == button_b .was_pressed ():
93+ time .sleep (0.1 )
94+ time .sleep (0.5 )
95+ display .show ('O' , color = (0 , 20 , 0 ))
96+
10097music .play (music .POWER_DOWN )
10198time .sleep (0.5 )
10299display .clear ()
0 commit comments