--- title: "Entrapment" id: 76417 type: "computer_media" slug: "entrapment" url: "http://localhost/computer_media/entrapment/" markdown_url: "http://localhost/computer_media/entrapment.md" published_at: "2026-11-11T08:02:42+00:00" modified_at: "2026-11-11T08:02:42+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/entrapment-1.png" excerpt: "Box in the computer's runner before it boxes you in: steer your trail with the keys and trap the other player's line." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" 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: "Wayne DeJulia" slug: "wayne-dejulia" taxonomy: "indiv" url: "http://localhost/indiv/wayne-dejulia/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Program" programmers: - name: "Wayne DeJulia" slug: "wayne-dejulia" taxonomy: "indiv" url: "http://localhost/indiv/wayne-dejulia/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Entrapment%20%281982%29%28DeJulia%2C%20Wayne%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/entrapment-1.png" - url: "http://localhost/wp-content/uploads/2026/11/entrapment-2.png" article_media: - id: 19289 title: "Entrapment" type: "article" url: "http://localhost/article/entrapment/" media_type_tags: "Game" license: false --- # Entrapment A trapping game for 16K. Your inverse star leaves a trail as it moves; steer it with I (up), M (down), J (left) and K (right), and with no key pressed it keeps moving right. The computer’s player does the same. Run into a trail and you lose; trap the computer and you win. After YOU WIN or YOU LOSE the game starts again. The playing field is kept in memory above address 30000, so it needs 16K. Published in Syntax August 1982 ([Entrapment](https://timexsinclair.com/article/entrapment/)). ## Source Code ``` 50 CLEAR 55 CLS 60 LET B=30000 69 FAST 70 FOR L=2 TO 19 71 FOR M=2 TO 30 72 POKE B+L*40+M,CODE (" ") 73 NEXT M 74 NEXT L 80 RAND 110 FOR N=1 TO 31 120 PRINT AT 21,N;"▞" 130 PRINT AT 1,N;"▞" 140 POKE B+21*40+N,CODE ("▞") 150 POKE B+1*40+N,CODE ("▞") 160 NEXT N 170 FOR N=1 TO 21 180 PRINT AT N,1;"▞" 190 PRINT AT N,31;"▞" 200 POKE B+N*40+1,CODE ("▞") 210 POKE B+N*40+31,CODE ("▞") 220 NEXT N 225 SLOW 230 LET A=INT (RND*16+2) 240 LET C=INT (RND*26+2) 250 PRINT AT A,C;"+" 251 POKE B+A*40+C,CODE ("+") 252 LET D=INT (RND*17+2) 253 LET E=INT (RND*26+2) 254 PRINT AT D,E;"*" 255 POKE B+D*40+E,CODE ("*") 256 LET M$=INKEY$ 258 IF M$="K" THEN GOTO 510 259 IF M$="I" THEN GOTO 530 260 IF M$="M" THEN GOTO 550 265 IF M$="J" THEN GOTO 490 266 GOTO 510 270 LET C=C+1 272 IF PEEK (B+A*40+C)<>CODE (" ") THEN GOTO 290 273 PRINT AT A,C;"+" 275 POKE B+A*40+C,CODE ("+") 280 GOTO 256 290 LET C=C-1 300 LET C=C-1 305 IF PEEK (B+A*40+C)<>CODE (" ") THEN GOTO 340 310 PRINT AT A,C;"+" 320 POKE B+A*40+C,CODE ("+") 330 GOTO 256 340 LET C=C+1 341 LET A=A+1 344 IF PEEK (B+A*40+C)<>CODE (" ") THEN GOTO 400 355 PRINT AT A,C;"+" 360 POKE B+A*40+C,CODE ("+") 370 GOTO 256 400 LET A=A-1 403 LET A=A-1 405 IF PEEK (B+(A*40)+C)<>CODE (" ") THEN GOTO 450 410 PRINT AT A,C;"+" 420 POKE B+(A*40)+C,CODE ("+") 430 GOTO 256 450 CLS 460 PRINT AT 10,10;"YOU WIN" 461 PAUSE 100 465 GOTO 50 490 LET E=E-1 500 IF PEEK (B+D*40+E)<>CODE (" ") THEN GOTO 700 501 PRINT AT D,E;"*" 502 POKE B+D*40+E,CODE ("*") 503 GOTO 270 510 LET E=E+1 520 IF PEEK (B+D*40+E)<>CODE (" ") THEN GOTO 700 521 POKE B+D*40+E,CODE ("*") 522 PRINT AT D,E;"*" 523 GOTO 270 530 LET D=D-1 540 IF PEEK (B+D*40+E)<>CODE (" ") THEN GOTO 700 541 POKE B+D*40+E,CODE ("*") 545 PRINT AT D,E;"*" 547 GOTO 270 550 LET D=D+1 560 IF PEEK (B+D*40+E)<>CODE (" ") THEN GOTO 700 565 POKE B+D*40+E,CODE ("*") 570 PRINT AT D,E;"*" 575 GOTO 270 700 CLS 705 PRINT AT 10,12;"YOU LOSE" 715 PAUSE 100 720 GOTO 50 ```