Professional Documents
Culture Documents
().
True/False (/).
If ().
Clock () animation
.
Clock () .
35 70
,
.
(variables).
.
(If then ).
App Inventor
, .
2
.
(text labels)
.
Designer
Label
() User Interface.
UserInterface
Label
ResultLabel
Font Size : 40
Text Alignment : center
Text :
Width : Fill Parent
36 70
UserInterface
Label
ScoreLabel
Font Size : 20
TextColor : White
Text : : 0
Width : Fill Parent
Blocks
random integer from
,
. .
. , , , .
.
0. 50, ( 0) .
54 -
37 70
, .
, Variables
() initialize global [name] to ,
.
55 - Variables
56 -
dice1
0.
dice2
0.
38 70
57 -
set [
] to, .
58 -
dice1 1
6.
(duplicate)
dice2.
.
59 -
, set Dice1Image.Picture to
join , .
get [ ], Variable,
.
39 70
60 - get
61 -
IF ()
, 6 ,
dice1 dice2 6.
if [ ] then ( [ ] ) Control.
62 - If
: ,
(
). . , .
.
dice1 6, .
40 70
63 -
dice2.
,
. and ().
64 - AND
O AND ,
.
65 - AND
, if.
66 - if
E IF
! .
set [ResultLabel].Text
to ResultLabel.
67 -
!. if
.
41 70
68 - if
dice1 6 dice2
6, !
69 - H
,
.
. score
0.
70 - score
42 70
, ,
1. 1.
71 - score 1
score.
72 - score
score 1.
if.
ScoreLabel
set [ScoreLabel].Text to ScoreLabel.
: score.
.
73 -
43 70
74 -
!
.
1. , !. ,
().
2. , , ,
.
3.
(.. longClick)
.
44 70