--- title: "Combat" type: "article" slug: "combat-2" url: "http://localhost/article/combat-2/" markdown_url: "http://localhost/article/combat-2.md" published_at: "2026-11-25T23:10:10+00:00" modified_at: "2026-11-26T10:48:20+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Our ZX/TS program this month comes again from JACK ARMSTRONG and is a short little game. 10 REM \"COMBAT\" 20 LET SCORE=0 30 FOR J=1 TO 20 35 GOSUB 1000 40 PRINT AT 0,0;\"ENTER A NUMBER FROM 1 TO 10\";AT 1,8;\"GO NUMBER \";J 50 INPUT A 60 IF A<1 OR A>10 THEN GOTO 50 70…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Jack Armstrong" slug: "armstrong-jack" taxonomy: "indiv" url: "http://localhost/indiv/armstrong-jack/" publication_r: id: 21216 title: "The Plotter" type: "periodical" url: "http://localhost/periodical/the-plotter/" authors: "Jack Armstrong" volume: "2" issue: "3" issues_articles: - id: 39413 title: "The Plotter v2 n3" type: "issue" url: "http://localhost/issue/the-plotter-v2-n3/" pages: "4" pubdate: "March 1984" archive_link: false article_media: - id: 80604 title: "Combat" type: "computer_media" url: "http://localhost/computer_media/combat/" --- # Combat Our ZX/TS program this month comes again from [JACK ARMSTRONG](http://localhost/indiv/armstrong-jack/) and is a short little game. ``` 10 REM "COMBAT" 20 LET SCORE=0 30 FOR J=1 TO 20 35 GOSUB 1000 40 PRINT AT 0,0;"ENTER A NUMBER FROM 1 TO 10";AT 1,8;"GO NUMBER ";J 50 INPUT A 60 IF A<1 OR A>10 THEN GOTO 50 70 PRINT AT 10,0;"YOUR NUMBER IS ";A;AT 12,6;"SCORE IS ";SCORE 80 FOR G=1 TO 4 90 LET B=INT (RND*10)+1 100 PRINT AT 3,3;B;" " 110 IF B=A THEN GOTO 130 120 NEXT G 130 IF A=B THEN LET SCORE=SCORE+1 140 IF A=B THEN PRINT AT 14,6;"WELL DONE" 150 IF A<>B THEN PRINT AT 14,8;"BAD LUCK" 160 PRINT AT 12,6;"SCORE IS ";SCORE 170 IF SCORE=5 THEN GOTO 260 180 FOR T=1 TO 20 190 NEXT T 200 CLS 210 NEXT J 220 PRINT "THE GAME IS OVER AND YOU ONLY" 230 PRINT "SCORED ";SCORE 240 PRINT "YOUR RATING IS ";SCORE/.05;" PERCENT" 250 GOTO 290 260 PRINT "YOU DID IT" 270 SCROLL 280 PRINT "YOU WIN" 290 SCROLL 300 PRINT "ANOTHER TRY? PRESS ""RUN"" ""ENTER""" 310 STOP ``` ``` 1000 LET A$=" \..\..\..\..\::\::\:: \':\::\:: \::\::\::\::\::\::\::\::\::\::\:: \::\::\::\::\::\::\::\::\::\::\::\::\:: \::\::\::\::\::\::\::\::\::\::\::\:: \':\:'\|.\|.\|.\|.\|.\':\:' " 1010 LET B$=" \::\::\:: \::\::\:: \::\:. \.:\:: \::\::\:: \.:\::\:. \::\::\:: \:: \:: \:: \:: \::\ '\::\' \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \::\::\:: \::\::\:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \::\::\:: \::\::\:: \:: \:: \::\::\:: \:: \:: \:: \::" ``` [View the printed page](http://localhost/wp-content/uploads/2026/11/plotter-new-v2-n3-combat-1.png) ``` 1020 PRINT AT 4,2;B$ 1030 RETURN 2000 SAVE "COMBAT" 3000 GOTO 10 ``` *Transcription note: This is the same graphics as Combat! in The Plotter v9 n10, which differs in a few cells of A$ and in the spacing of B$. The faint E of LET in line 1010 is restored.* ## Source Code: Combat ``` 10 REM "COMBAT" BY JACK ARMSTRONG 15 REM MARCH 1983 "THE PLOTTER" 18 REM ENTER 20 NUMBERS BETWEEN 1 AND 10 20 LET SCORE=0 30 FOR J=1 TO 20 35 GOSUB 1000 40 PRINT AT 0,0;"ENTER A NUMBER FROM 1 TO 10";AT 1,8;"GO NUMBER ";J 50 INPUT A 60 IF A<1 OR A>10 THEN GOTO 50 70 PRINT AT 10,0;"YOUR NUMBER IS ";A;AT 12,6;"SCORE IS ";SCORE 80 FOR G=1 TO 4 90 LET B=INT (RND*10)+1 100 PRINT AT 3,3;B;" " 110 IF B=A THEN GOTO 130 120 NEXT G 130 IF A=B THEN LET SCORE=SCORE+1 140 IF A=B THEN PRINT AT 14,6;"WELL DONE" 150 IF A<>B THEN PRINT AT 14,8;"BAD LUCK" 160 PRINT AT 12,6;"SCORE IS ";SCORE 170 IF SCORE=5 THEN GOTO 260 180 FOR T=1 TO 20 190 NEXT T 200 CLS 210 NEXT J 220 PRINT "THE GAME IS OVER AND YOU ONLY"; 230 PRINT "SCORED ";SCORE 240 PRINT "YOUR RATING IS ";SCORE/.05;" PERCENT" 250 GOTO 290 260 SCROLL 280 PRINT "YOU WIN" 290 SCROLL 300 PRINT "ANOTHER TRY? PRESS ""RUN"" ""ENTER""" 310 STOP 1000 LET A$=" \..\..\..\..\::\::\:: \''\::\:: \::\::\::\::\::\::\::\::\::\::\:: \::\::\::\::\::\::\::\::\::\::\::\::\:: \::\::\::\::\::\::\::\::\::\::\::\:: \ '\::\':\|.\|.\|.\|.\|.\':\:'" 1010 LET B$=" \::\::\:: \::\::\:: \::\:. \.:\:: \::\::\:: \.: \::\:. \::\::\:: \:: \:: \:: \:: \::\ '\::\' \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \::\::\:: \:: \::\:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \:: \::\::\:: \::\::\:: \:: \:: \::\::\:: \:: \:: \:: \::" 1020 PRINT AT 4,2;B$ 1025 PRINT AT 12,9;A$ 1030 RETURN ```