PRINT CHR$ 8; OVER 1; "/"
Why do you recover an unblemished B?
Type:
PAPER 0: INK 0
Isn't it just as well that these don't affect the lower part of the screen?
Now type:
BORDER 0
and see how well the computer looks after you!
But what will happen if you do the same after giving:
LAYER 1,3
Run this program:
10 POKE 22527+RND*704, RND*127
20 GO TO 10
Never mind how this works; it is changing the colours of squares on the screen and the RNDs should ensure that this happens randomly. The diagonal stripes that you eventually see are a manifestation of the hidden pattern in RND – the pattern that makes it pseudorandom instead of truly random.
Type in the chess piece characters in Chapter 13 and then type in this program which draws a diagram of chess positions using them:
5 REM draw blank board
10 bb,bw=1,2: REM red and
blue for board
15 PAPER bw: INK bb: CLS
20 PLOT 79,128: REM border
30 DRAW 65,0: DRAW 0,-65
40 DRAW -65,0: DRAW 0,65
50 PAPER bb
60 REM board
70 FOR n=0 TO 3: FOR m=0 TO 3
80 PRINT AT 6+2*n, 11+2*m;" "
90 PRINT AT 7+2*n, 10+2*m;" "
100 NEXT m: NEXT n
110 PAPER 8
120 pw,pb=6,5: REM colours of
white and black pieces
200 DIM b$(8,8): REM positions of pieces
205 REM set up initial positions
210 b$(1)="rnbqkbnr"
220 b$(2)="pppppppp"
230 b$(7)="PPPPPPPP"
ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.