Introducing Insert and Edits Capabilities

You can give it as much instruction and guidance as you want. However, it will operate quite like the completion model, where you have to phrase in a way where you are still filling in text based on the expanded “system” you are giving it as part of the original text or narrative. The difference is with [insert], you get to write the ending for it to meet up with if desired.

Basically, you can include a literature review or a preface introduction before the text it is supposed to complete, something like “Editor’s note: we warn our reader that the chapter you are about to read has graphic depictions of dangerous Australian drop-bears that may give children nightmares, especially at the 2/3-point where there is an unexpected twist to the plot…”

This was done on the insert endpoint, where [insert] was just placed after the first line of code. Here, it sees this as a problem to solve, like maybe it’s taking a test (and I give it a “B” for not using paddles, and I don’t know if this code actually even does anything):

You are writing a Commodore 64 program. It shall use all colors as much as possible. Although it is written in C64 Microsoft BASIC, it can use advanced features, like peek and poke to access the ROM and RAM functions. It is a simple game in the spirit of the Atari 2600 game “Night Driver”, where a race car on the bottom of the screen is controlled by paddles, and must negotiate a maze of road markers and occasional obstacles. There is also another pace car competitor that can pass a slow player, causing them to lose the two-minute-long race.

Your Answer:

10 REM INTRODUCTION SCREEN
20 PRINT “Night Driver!”, CHR$(19)
30 PRINT “Can you beat the clock and your competition?”
40 PRINT “Use the joystick to control your car and press fire to start.”
50 PRINT
60 PRINT “GET READY!”

70 REM SET-UP VARIABLES
80 DIM X(40):DIM Y(40):DIM O(40):DIM P(40):DIM A(5):DIM U
90 REM COUNTER
100 U=1

110 REM SET-UP ATTRIBUTES
120 FOR N=0 TO 16
130 POKE 56334+N, 6 OR 8*PEEK(56334+N)
140 NEXT N

150 REM SET-UP PADDLES
160 FOR N=0 TO 7
170 POKE 56336+N, 8*PEEK(56336+N)
180 NEXT N

190 REM SET-UP SCREEN
200 REM ENABLE ALL COLORS AND SET BACKGROUND
210 POKE 53280, 52
220 POKE 53281, 17
230 REM MAKE COLOR RAM SELECTABLE
240 POKE 53278, 1

250 REM PRINT ROAD MARKERS
260 FOR N=1 TO 40
270 READ X(N), Y(N), O(N)
280 PSET(X(N), Y(N)), 8
290 NEXT N

300 REM CAR#1 SET UP
310 READ A(1): P(2) = A(1)+1
320 X1(1)= A(1)-1
330 Y1(1)= 10
340 PSET(X1(1),Y1(1)),7
350 STICK 1, U
360 X1(U)= X1(1)
370 Y1(U)= Y1(1)

380 READ A(2): P(2) = A(2)+1
390 X2(1)= A(2)-1
400 Y2(1)= 10
410 PSET(X2(1),Y2(1)),7
420 STICK 2, U
430 X2(U)= X2(1)
440 Y2(U)= Y2(1)

450 REM MAIN LOOP
460 FOR N=1 TO 250
470 REM CAR#1
480 REM READ PADDLE
490 X1=STICK(1)
500 Y1=STICK(2)

510 REM JOYSTICK CHECK
520 IF X1 > 4 AND Y1 < 4 THEN
530 X1(U)= Y1(U)+UX1
540 Y1(U)= Y1(U)-U
Y1
550 END IF
560 IF X1 > 4 AND Y1>4 THEN THEN
570 X1(U)= Y1(U)+UX1
580 Y1(U)= Y1(U)+U
Y1
590 END IF

600 PSET(X1(U),Y1(U)), 7
610 CIRCLE(X1(U),Y1(U)), 4

620 REM CAR#2
630 X2=STICK(3)
640 Y2=STICK(4)

650 REM JOYSTICK CHECK
660 IF X2 > 4 AND Y2 < 4 THEN
670 X2(U)= Y2(U)+UX2
680 Y2(U)= Y2(U)-U
Y2
690 END IF
700 IF X2 > 4 AND Y2>4 THEN THEN
710 X2(U)= Y2(U)+UX2
720 Y2(U)= Y2(U)+U
Y2
730 END IF

740 PSET(X2(U),Y2(U)), 7
750 CIRCLE(X2(U),Y2(U)), 4

760 REM WINNER
770 IF X1(U) > X2(U) THEN
780 PRINT “Player 1 Wins!”
790 ELSEIF X2(U) > X1(U) THEN
800 PRINT “Player 2 Wins!”
810 END IF

820 NEXT N
830 GOTO 620

900 REM ROAD MARKER DATA
910 DATA 8,1,2,5,1,6,10,2,10,4,7,5,7,7,4,8,2,9,5,10,8,11,2,14,5,14,7,17,8,17,10,20,11,20,13,24,14,24,16,27,17,27,19,29,20,29,21,32,22,32,24,35,25,35,27,38,28,38,30,41,31,41,33