home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / devtools / files / lb202win.exe / LB202W.EXE / SPACESHP.BAS < prev    next >
Encoding:
BASIC Source File  |  2000-12-06  |  1.1 KB  |  50 lines

  1.  
  2.     'open a graphical window and display spaceships
  3.  
  4.     nomainwin
  5.     drawX = 40
  6.     drawY = 40
  7.  
  8.     WindowWidth = 300
  9.     WindowHeight = 250
  10.     button #1, " OK ", [ok], LR, 40, 20
  11.     open "SPACESHIPS" for graphics as #1
  12.     print #1, "trapclose [ok]"
  13.     print #1, "fill black"
  14.     print #1, "color white"
  15.  
  16.     for x = 1 to 5
  17.         for y = 1 to 3
  18.             gosub [Spaceships]
  19.             drawY = drawY + 40
  20.             angle = angle + 15
  21.         next y
  22.         drawY = 40
  23.         drawX = drawX + 40
  24.     next x
  25.  
  26.     wait
  27.  
  28. [ok]
  29.  
  30.     close #1
  31.  
  32.     end
  33.  
  34. [Spaceships]
  35.  
  36.     print #1, "color white"
  37.     print #1, "place "; drawX; " "; drawY
  38.     print #1, "north; turn "; angle; "; down; turn 275; go 8; turn 85; go 10; turn 180; size 3; go 14"
  39.     print #1, "size 1"
  40.     print #1, "place "; drawX; " "; drawY
  41.     print #1, "north; turn "; angle; "; turn 85; go 8; turn 275; go 10; turn 180; size 3; go 14"
  42.     print #1, "size 1"
  43.     print #1, "place "; drawX; " "; drawY
  44.     print #1, "north; turn "; angle; "; turn 180; go 10; size 12; go 0"
  45.     print #1, "flush"
  46.     print #1, "size 1"
  47.  
  48.     return
  49.  
  50.