| |
|
HomeNewsExamplesDemoDownloadsFAQDocumentationMailing ListsLicense
|
|
5:14 am GMT
GeSHi - Generic Syntax Highlighter
Latest News
News Archive
|
Random Screenshot
Demonstration
Runtime Example
Do
DoEvents
Form1.SetFocus
PSet (Snakex, Snakey), vbGreen
Line (applex - 3, appley - 5)-(applex + 3, appley), vbGreen + 1, BF
Line (applex, appley)-(applex + 10, appley + 10), applecolor, BF
For i = 1 To delay: Next
Snakex = Snakex + SnakexMov
Snakey = Snakey + SnakeyMov
colortest = Point(Snakex + SnakexMov, Snakey + SnakeyMov)
If colortest = vbGreen + 1 Or colortest = applecolor Then
Line (applex - 3, appley - 5)-(applex + 10, appley + 10), vbWhite, BF
'Line (10, 10)-(750, 750), vbWhite, BF
score = score + 10
delay = delay - 10000
If score > 30 And score < 60 Then delay = delay + 5000
If score > 60 Then delay = delay + 7500
applex = Int(600 * Rnd) + 10
appley = Int(600 * Rnd) + 10
ElseIf colortest <> vbWhite Then
Label1.Left = 250
Label1.ForeColor = vbBlack
Label1.BackColor = vbWhite
Label1.Caption = " You Lose " & Chr(10) & " Your Score was: " & score & "" & Chr(10) & "Press 'Enter' to play again and 'Esc' to exit"
Label1.AutoSize = True
Exit Do
Exit Sub
End
End If
Loop
|
|