--- title: "Combat" id: 80604 type: "computer_media" slug: "combat" url: "http://localhost/computer_media/combat/" markdown_url: "http://localhost/computer_media/combat.md" published_at: "2026-11-26T10:48:19+00:00" modified_at: "2026-11-26T10:48:19+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/combat-1.png" excerpt: "Guess the number against the computer under a block-graphic tank, for the ZX81." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - 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/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Program" programmers: - name: "Jack Armstrong" slug: "armstrong-jack" taxonomy: "indiv" url: "http://localhost/indiv/armstrong-jack/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Combat%20%281984%29%28Armstrong%2C%20Jack%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1984" images: - url: "http://localhost/wp-content/uploads/2026/11/combat-1.png" - url: "http://localhost/wp-content/uploads/2026/11/combat-3.png" - url: "http://localhost/wp-content/uploads/2026/11/combat-4.png" - url: "http://localhost/wp-content/uploads/2026/11/combat-5.png" article_media: - id: 80462 title: "Combat" type: "article" url: "http://localhost/article/combat-2/" - id: 43412 title: "Combat!" type: "article" url: "http://localhost/article/combat/" - id: 45313 title: "Oops" type: "article" url: "http://localhost/article/oops-3/" media_type_tags: "Game" license: false --- # Combat A number-guessing duel for the ZX81 or TS1000 under a block-graphic COMBAT! title and tank. Enter a number from 1 to 10 for each of 20 goes; the computer then draws up to four random numbers, and if one matches yours you score. Five hits wins; otherwise the game ends after 20 goes with a rating in percent (20 for each hit). The input is slow, so give the counter time to act after each number. The download is the 1991 printing, which adds line 1025 to print the tank; the 1984 printing never prints it (The Plotter’s April 1984 “Oops” asked readers to add a line that does). It needs more than 2K of RAM. Published in The Plotter March 1984 ([Combat](https://timexsinclair.com/article/combat-2/)), with a correction in April 1984 ([Oops](https://timexsinclair.com/article/oops-3/)), and printed again in October 1991 ([Combat!](https://timexsinclair.com/article/combat/)). ## Source Code ``` 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 ```