--- title: "Just for Fun" type: "article" slug: "just-for-fun" url: "http://localhost/article/just-for-fun/" markdown_url: "http://localhost/article/just-for-fun.md" published_at: "2020-10-27T17:18:24+00:00" modified_at: "2024-10-05T13:02:17+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Short reader programs: Survive The ZX Pumpkin Obtuse Triangle Message Destruct Train Revisited Strange Listing" category: - name: "SYNC" slug: "sync" taxonomy: "category" url: "http://localhost/category/periodicals/sync/" post_tag: - name: "1983" slug: "year-1983" taxonomy: "post_tag" url: "http://localhost/tag/year-1983/" - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" indiv: - name: "David Farrell" slug: "david-farrell" taxonomy: "indiv" url: "http://localhost/indiv/david-farrell/" - name: "Joe Chaiet" slug: "joe-chaiet" taxonomy: "indiv" url: "http://localhost/indiv/joe-chaiet/" - name: "John Hill" slug: "john-hill" taxonomy: "indiv" url: "http://localhost/indiv/john-hill/" - name: "Mark Hall" slug: "mark-hall" taxonomy: "indiv" url: "http://localhost/indiv/mark-hall/" - name: "Michael Schultz" slug: "michael-schultz" taxonomy: "indiv" url: "http://localhost/indiv/michael-schultz/" - name: "Robert Midura" slug: "robert-midura" taxonomy: "indiv" url: "http://localhost/indiv/robert-midura/" publication: "Sync" publication_r: id: 10243 title: "SYNC" type: "periodical" url: "http://localhost/periodical/sync-magazine/" authors: "Robert Midura; Mark Hall; Michael Schultz; Joe Chaiet; John Hill; David Farrell" volume: "3" issue: "5" issues_articles: - id: 26651 title: "SYNC v3 n5" type: "issue" url: "http://localhost/issue/sync-v3-n5/" pages: "8-12" pubdate: "September/October 1983" archive_link: false volumeissue: "v3n5" article_media: - id: 57418 title: "Survive" type: "computer_media" url: "http://localhost/computer_media/survive/" --- # Just for Fun Short reader programs: - Survive - The ZX Pumpkin - Obtuse Triangle - Message Destruct - Train Revisited - Strange Listing ## Source Code: Survive ``` 0 REM "SURVIVE" BY ROBERT MIDURA SYNC V3:5 2 CLS 3 GOTO 1000 4 SLOW 5 LET L=(INKEY$="6" AND X<21)-(INKEY$="7" AND X>1) 10 LET C=(INKEY$="8" AND Y<31)-(INKEY$="5" AND Y>1) 15 PRINT AT X,Y;" " 20 LET X=X+L 25 LET Y=Y+C 30 PRINT AT X,Y;"U" 35 IF Y>30 THEN GOTO 110 40 LET S=S+M(X,Y)+2 42 LET M(X,Y)=-2 45 LET T=T-1 50 IF NOT T THEN GOTO 80 55 IF T>0 THEN GOTO 5 60 LET T=INT (RND*3+3) 65 LET H=X+T*L 67 IF H>21 THEN LET H=21 68 IF H<1 THEN LET H=1 70 LET I=Y+T*C 72 IF I<1 THEN LET I=1 73 IF I>31 THEN LET I=31 75 GOTO 5 80 PRINT AT H,I;".'";AT H,I;"'.";AT H,I;".'";AT H,I;"'.";AT H,I;"%X" 100 LET M(X,Y)=-3 105 IF H<>X OR I<>Y THEN GOTO 5 110 PRINT AT 0,11;"% %S%C%O%R%E% ";S+(100 AND Y>30) 115 STOP 1000 LET X=10 1005 LET Y=1 1010 LET T=0 1015 DIM M(21,30) 1020 LET S=T 1025 FOR L=1 TO 21 1030 PRINT AT L,0;" ..............................." 1035 NEXT L 1040 GOTO 4 2000 STOP 2010 REM RAND USR 14336 2030 REM SAVE "SRVIVE.B1" 2035 SAVE "1021%9" 2040 RUN ```