Grazie a tutti per l'intervento ecco il codice
Sub Globals
Dim punti As Int
Dim a As Int
Dim b As Int
Dim timer1 As Timer
Dim timer2 As Timer
Dim Butgioca As Button
Dim EditText1 As EditText
Dim EditText2 As EditText
Dim img1 As ImageView
Dim img2 As ImageView
Dim Label1 As Label
Dim Label3 As Label
Dim lbl1giocatore As Label
Dim lbl2giocatore As Label
End Sub
__________________________________________________
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("scf")
timer1.Initialize("timer1",500)
timer1.Enabled=False
timer2.Initialize("timer2",3000)
timer2.Enabled=False
End Sub
_______________________________________________________
Sub Activity_Resume
End Sub
___________________________________________________________
Sub Activity_Pause (UserClosed As Boolean)
End Sub
________________________________________________________________
Sub Butgioca_Click
timer1.Enabled=True
timer2.Enabled=True
a=Rnd(1,4)
b=Rnd (1,4)
Select a
Case 1
sasso2
Case 2
carta2
Case 3
forbici2
End Select
Select b
Case 1
sasso
Case 2
carta
Case 3
forbici
End Select
If timer1.Enabled=False AND sasso2=carta Then
punti=punti+1
lbl2giocatore.Text=punti
Else If timer1.Enabled=False AND sasso2=forbici Then
punti=punti+1
lbl1giocatore.Text=punti
End If
End If
______________________________________________________
End Sub
Sub timer2_tick
timer2.Enabled=False
timer1.Enabled=False
End Sub
_______________________________________________________
Sub timer1_tick
timer1.Enabled=True
timer2.Enabled=True
a=Rnd(1,4)
b=Rnd (1,4)
Select a
Case 1
sasso2
Case 2
carta2
Case 3
forbici2
End Select
Select b
Case 1
sasso
Case 2
carta
Case 3
forbici
End Select
End Sub
________________________________________________________
Sub sasso
img2.Bitmap=LoadBitmap(File.DirAssets,"sasso.png")
End Sub
______________________________________________________________
Sub carta
img2.Bitmap=LoadBitmap(File.DirAssets,"carta.png")
End Sub
_____________________________________________________________________
Sub forbici
img2.Bitmap=LoadBitmap(File.DirAssets,"forbici.png")
End Sub
__________________________________________________________________
Sub sasso2
img1.Bitmap=LoadBitmap(File.DirAssets,"sasso2.png")
End Sub
_________________________________________________________
Sub carta2
img1.Bitmap=LoadBitmap(File.DirAssets,"carta2.png")
End Sub
___________________________________________________________________
Sub forbici2
img1.Bitmap=LoadBitmap(File.DirAssets,"forbici2.png")
End Sub