Title: Just for Fun - April Fool's Joke Issue: Spectrum Mar/Apr 2000 author:Nathan Rector company:Natec Systems email:nater@northcoast.com http:www.northcoast.com/~nater/ April Fools is just around the corner, and for those people who remember Spectrum Tech, about this time of year someone wrote one of those "Just for Fun" articles. It's been a while since I've seen a program that was "Just for Fun", so I decided it would be interesting to write one. Like those articles, the program in this article is one of those that may have some neat coding tricks, but doesn't really enhance your systems any... other than to catch the unwary. This program was written several years ago as an April Fools Joke. All this program does is create a bunch of "worms" that travel across someone's screen and "eats" the text off. You tell the program how many "worms" you want to display and what text you want the worms to consist of, for example, MUNCH or APRIL FOOLS or even '<======='. In general, this program will cause the "worms" to travel across your screen and randomly change directions as well as drill into your screen to come out in another place on the screen. As the worms travel across the screen, they leave blank spaces behind them at basically makes it look like they are eating the text off your screen. For the most part this code will across all systems, but there are two command that will have to change depending on which system you are on: SYSTEM(14) - returns if the user pressed a key on the keyboard SYSTEM(13) - sleeps for a fraction of a second. Hope you enjoy this little program. WORM2 SUBROUTINE WORM2(WORMNUM,WORM.WORD) * * PROMPT "" WORM = "" FOR W = 1 TO WORMNUM WORM = WORM.WORD NEXT W * STOP.LOOP = 0 ; MAXCOUNT = 10 ; COUNT = MAXCOUNT PAUSENUM = 300 * LOOP UNTIL STOP.LOOP DO * *** KEEPSeeps looping until told to stop *** *** WORM<1,1> = WORM NAME *** WORM<1,2,N> = Col of each letter *** WORM<1,3,N> = Row of each letter *** WORM<1,4,N> = rand * *** *** Displays worm on screen *** * 50* FOR W = 1 TO WORMNUM OLD.RAND = WORM ; WORM1 = "" NUM = LEN(WORM) + 1 FOR I = 1 TO NUM BEGIN CASE CASE I = 1 AND COUNT = MAXCOUNT 100* RAND = RND(9) IF RAND = 0 AND INDEX(OLD.RAND,"0",1) THEN GOTO 100 BEGIN CASE CASE RAND = 1 AND OLD.RAND<1,1,2> = 4 ; RAND = 4 CASE RAND = 2 AND OLD.RAND<1,1,2> = 3 ; RAND = 3 CASE RAND = 3 AND OLD.RAND<1,1,2> = 2 ; RAND = 2 CASE RAND = 4 AND OLD.RAND<1,1,2> = 1 ; RAND = 1 CASE RAND = 5 AND OLD.RAND<1,1,2> = 8 ; RAND = 8 CASE RAND = 6 AND OLD.RAND<1,1,2> = 7 ; RAND = 7 CASE RAND = 7 AND OLD.RAND<1,1,2> = 6 ; RAND = 6 CASE RAND = 8 AND OLD.RAND<1,1,2> = 5 ; RAND = 5 END CASE IF RAND = 9 THEN WORMNUM = WORMNUM + 1 WORM = WORM GOTO 50 END CASE I = 1 RAND = OLD.RAND<1,1,2> CASE OLD.RAND<1,1,I> = "" * nothing to display GOTO 500 CASE 1 RAND = OLD.RAND<1,1,I> END CASE * COL = WORM ; ROW = WORM IF COL = "" THEN COL = 40 IF ROW = "" THEN ROW = 12 * BEGIN CASE CASE RAND = 1 OR RAND = 9 ;* move right COL = COL - 1 ; RAND = 1 CASE RAND = 2 OR RAND = 10 ;* move up ROW = ROW - 1 ; RAND = 2 CASE RAND = 3 OR RAND = 11 ;* move down ROW = ROW + 1 ; RAND = 3 CASE RAND = 4 OR RAND = 12 ;* move left COL = COL + 1 ; RAND = 4 CASE RAND = 5 OR RAND = 13 ;* move UP/right COL = COL - 1 ; ROW = ROW - 1 ; RAND = 5 CASE RAND = 6 OR RAND = 14 ;* move UP/LEFT COL = COL + 1 ; ROW = ROW - 1 ; RAND = 6 CASE RAND = 7 OR RAND = 15 ;* move down/RIGHT COL = COL - 1 ; ROW = ROW + 1 ; RAND = 7 CASE RAND = 8 OR RAND = 16 ;* move DOWN/left COL = COL + 1 ; ROW = ROW + 1 ; RAND = 8 CASE RAND = 0 ;* Burrow BEGIN CASE CASE I = 1 AND COUNT = MAXCOUNT COL = RND(20) + RND(20) ROW = RND(12) - RND(12) CASE 1 COL = WORM ROW = WORM END CASE END CASE IF COL <= 0 THEN COL = 78 IF COL >= 79 THEN COL = 0 IF ROW <= 0 THEN ROW = 22 IF ROW >= 23 THEN ROW = 0 * WORM.PART = WORM[I,1] IF WORM.PART = "" THEN WORM.PART = " " * WORM1 = WORM1 : @(COL,ROW) : WORM.PART * WORM = COL WORM = ROW WORM = RAND IF I = 1 THEN WORM = RAND IF RAND = 0 THEN WORM = COL WORM = ROW END 500* IF SYSTEM(14) THEN GOTO 900 NEXT I * 600* CRT WORM1 : NEXT W * ** pauses * FOR P = 1 TO PAUSENUM JUNK = SYSTEM(13) NEXT P * IF COUNT = MAXCOUNT THEN COUNT = 0 END ELSE COUNT = COUNT + 1 END REPEAT 900* RETURN END Title: Just for Fun - April Fool's Joke Issue: Spectrum Mar/Apr 2000 author:Nathan Rector company:Natec Systems email:nater@northcoast.com http:www.northcoast.com/~nater/ April Fools is just around the corner, and for those people who remember Spectrum Tech, about this time of year someone wrote one of those "Just for Fun" articles. It's been a while since I've seen a program that was "Just for Fun", so I decided it would be interesting to write one. Like those articles, the program in this article is one of those that may have some neat coding tricks, but doesn't really enhance your systems any... other than to catch the unwary. This program was written several years ago as an April Fools Joke. All this program does is create a bunch of "worms" that travel across someone's screen and "eats" the text off. You tell the program how many "worms" you want to display and what text you want the worms to consist of, for example, MUNCH or APRIL FOOLS or even '<======='. In general, this program will cause the "worms" to travel across your screen and randomly change directions as well as drill into your screen to come out in another place on the screen. As the worms travel across the screen, they leave blank spaces behind them at basically makes it look like they are eating the text off your screen. For the most part this code will across all systems, but there are two command that will have to change depending on which system you are on: SYSTEM(14) - returns if the user pressed a key on the keyboard SYSTEM(13) - sleeps for a fraction of a second. Hope you enjoy this little program. WORM2 SUBROUTINE WORM2(WORMNUM,WORM.WORD) * * PROMPT "" WORM = "" FOR W = 1 TO WORMNUM WORM = WORM.WORD NEXT W * STOP.LOOP = 0 ; MAXCOUNT = 10 ; COUNT = MAXCOUNT PAUSENUM = 300 * LOOP UNTIL STOP.LOOP DO * *** KEEPSeeps looping until told to stop *** *** WORM<1,1> = WORM NAME *** WORM<1,2,N> = Col of each letter *** WORM<1,3,N> = Row of each letter *** WORM<1,4,N> = rand * *** *** Displays worm on screen *** * 50* FOR W = 1 TO WORMNUM OLD.RAND = WORM ; WORM1 = "" NUM = LEN(WORM) + 1 FOR I = 1 TO NUM BEGIN CASE CASE I = 1 AND COUNT = MAXCOUNT 100* RAND = RND(9) IF RAND = 0 AND INDEX(OLD.RAND,"0",1) THEN GOTO 100 BEGIN CASE CASE RAND = 1 AND OLD.RAND<1,1,2> = 4 ; RAND = 4 CASE RAND = 2 AND OLD.RAND<1,1,2> = 3 ; RAND = 3 CASE RAND = 3 AND OLD.RAND<1,1,2> = 2 ; RAND = 2 CASE RAND = 4 AND OLD.RAND<1,1,2> = 1 ; RAND = 1 CASE RAND = 5 AND OLD.RAND<1,1,2> = 8 ; RAND = 8 CASE RAND = 6 AND OLD.RAND<1,1,2> = 7 ; RAND = 7 CASE RAND = 7 AND OLD.RAND<1,1,2> = 6 ; RAND = 6 CASE RAND = 8 AND OLD.RAND<1,1,2> = 5 ; RAND = 5 END CASE IF RAND = 9 THEN WORMNUM = WORMNUM + 1 WORM = WORM GOTO 50 END CASE I = 1 RAND = OLD.RAND<1,1,2> CASE OLD.RAND<1,1,I> = "" * nothing to display GOTO 500 CASE 1 RAND = OLD.RAND<1,1,I> END CASE * COL = WORM ; ROW = WORM IF COL = "" THEN COL = 40 IF ROW = "" THEN ROW = 12 * BEGIN CASE CASE RAND = 1 OR RAND = 9 ;* move right COL = COL - 1 ; RAND = 1 CASE RAND = 2 OR RAND = 10 ;* move up ROW = ROW - 1 ; RAND = 2 CASE RAND = 3 OR RAND = 11 ;* move down ROW = ROW + 1 ; RAND = 3 CASE RAND = 4 OR RAND = 12 ;* move left COL = COL + 1 ; RAND = 4 CASE RAND = 5 OR RAND = 13 ;* move UP/right COL = COL - 1 ; ROW = ROW - 1 ; RAND = 5 CASE RAND = 6 OR RAND = 14 ;* move UP/LEFT COL = COL + 1 ; ROW = ROW - 1 ; RAND = 6 CASE RAND = 7 OR RAND = 15 ;* move down/RIGHT COL = COL - 1 ; ROW = ROW + 1 ; RAND = 7 CASE RAND = 8 OR RAND = 16 ;* move DOWN/left COL = COL + 1 ; ROW = ROW + 1 ; RAND = 8 CASE RAND = 0 ;* Burrow BEGIN CASE CASE I = 1 AND COUNT = MAXCOUNT COL = RND(20) + RND(20) ROW = RND(12) - RND(12) CASE 1 COL = WORM ROW = WORM END CASE END CASE IF COL <= 0 THEN COL = 78 IF COL >= 79 THEN COL = 0 IF ROW <= 0 THEN ROW = 22 IF ROW >= 23 THEN ROW = 0 * WORM.PART = WORM[I,1] IF WORM.PART = "" THEN WORM.PART = " " * WORM1 = WORM1 : @(COL,ROW) : WORM.PART * WORM = COL WORM = ROW WORM = RAND IF I = 1 THEN WORM = RAND IF RAND = 0 THEN WORM = COL WORM = ROW END 500* IF SYSTEM(14) THEN GOTO 900 NEXT I * 600* CRT WORM1 : NEXT W * ** pauses * FOR P = 1 TO PAUSENUM JUNK = SYSTEM(13) NEXT P * IF COUNT = MAXCOUNT THEN COUNT = 0 END ELSE COUNT = COUNT + 1 END REPEAT 900* RETURN END