'=========================================================================== ' Subject: FLYS Date: 03-02-97 (06:56) ' Author: Nick Kochakian Code: QB, QBasic, PDS ' Origin: NickK@worldnet.att.net Packet: GRAPHICS.ABC '=========================================================================== '---------------------------------------------------------------------------- 'Flys ' '1997 By: - Nick Kochakian - ' 'Have fun! :) '---------------------------------------------------------------------------- RANDOMIZE TIMER SCREEN 13 flys = 20 'How many to put on the screen flys px = flys py = flys dir = flys DIM x(px) DIM y(py) DIM d(dir) px = 1 py = 1 dir = 1 FOR i = 1 TO flys x(px) = 100 y(py) = 100 d(dir) = INT(RND * 8) + 1 px = px + 1 py = py + 1 dir = dir + 1 NEXT i px = 1 py = 1 dir = 1 DO PSET (x(px), y(py)), 0 d(dir) = INT(RND * 8) + 1 IF d(dir) = 1 THEN x(px) = x(px) + 1 IF d(dir) = 2 THEN y(py) = y(py) + 1 IF d(dir) = 3 THEN x(px) = x(px) + 1: y(py) = y(py) + 1 IF d(dir) = 4 THEN x(px) = x(px) - 1: y(py) = y(py) + 1 IF d(dir) = 5 THEN x(px) = x(px) + 1: y(py) = y(py) - 1 IF d(dir) = 6 THEN x(px) = x(px) - 1: y(py) = y(py) - 1 IF d(dir) = 7 THEN x(px) = x(px) - 1 IF d(dir) = 8 THEN y(py) = y(py) - 1 IF x(px) < 1 THEN x(px) = 1 IF x(px) > 200 THEN x(px) = 200 IF y(py) < 1 THEN y(py) = 1 IF y(py) > 300 THEN y(py) = 300 PSET (x(px), y(py)), 15 'FOR i = 1 TO 9999 'NEXT i px = px + 1 py = py + 1 dir = dir + 1 IF px > flys THEN px = 1 IF py > flys THEN py = 1 IF dir > flys THEN dir = 1 LOOP UNTIL INKEY$ <> ""