04.03.2013 Views

spectrum graphics - OpenLibra

spectrum graphics - OpenLibra

spectrum graphics - OpenLibra

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

i a a<br />

• • •<br />

• w<br />

!.V.<br />

fflf<br />

W .<br />

sv.<br />

S*<br />

.'.V<br />

• • •<br />

• • •<br />

•V.<br />

sv.<br />

• • •<br />

• a •<br />

• a B<br />

• w<br />

• • •<br />

a a a<br />

*<br />

• • a<br />

a a a<br />

ZX81STRATEGY<br />

Robin Thompson takes the tedium out<br />

of the game with this ZX81 version for<br />

2-4 players.<br />

On RUNing, the program wiil ask<br />

how many people are to play,<br />

and will request their names.<br />

There will then be a brief pause<br />

while the board is set up and<br />

displayed. Instructions will be<br />

printed, and the game will com<br />

mence, ending when all the letters<br />

have been used and no-one<br />

can continue.<br />

Please note that the program<br />

has no facilities for correcting a<br />

mistake in the players' input, so<br />

care must be taken when typing<br />

in words.<br />

Typing the program in should<br />

present no problems, other than<br />

the <strong>graphics</strong> characters, and<br />

these are listed in figure 1 .<br />

variables<br />

The main variables used by the<br />

program are as follows;<br />

8$ - holds the board.<br />

C$ holds the letters to be<br />

distributed amongst the payers<br />

E$ -holds the players' letters.<br />

X$ holds the players' names.<br />

X-holds the players' scores.<br />

SI the start of the diaplay file.<br />

P-the number of players.<br />

Figure 1 Scrabble board <strong>graphics</strong> \<br />

Line 8430 i 1<br />

Line 8435<br />

Line 7 7 eight graphic S Line 8445 i inverse T<br />

Line 75 inverse 'space' Line 8450 \<br />

Line 7000 inverse T Line 8460<br />

Line 7010 inverse 'D' Line 8465 1<br />

Line 8395 inverse 'space' Line 84 70 > inverse D<br />

Line 8400 inverse 'space' Line 84 75 \<br />

Line by Line<br />

1 to 85 initialisation of variables and instructions.<br />

86 to 1 70 print the scores, who is next to play, their letters.<br />

and inputting coordinates for letters on<br />

the board.<br />

171 to 1 30 work out the coordinates of letters to go on<br />

the board.<br />

311 to 31 8 bonus score of 50 points when a player uses<br />

all seven letters in one go.<br />

319 to 502 check for double or triple word score, print out<br />

score, and prepare for next player's turn.<br />

Subroutines<br />

3000 checks to see if your letters are next to any<br />

others on the board, and adds the necessary<br />

score.<br />

3800 POKEs your letter onto the screen.<br />

4000 allocates new letters, and prints them on<br />

screen.<br />

5000 Endgame routine. Works out who scored<br />

most, and prints out scores.<br />

6000 initialises the array that is to hold the players'<br />

letters.<br />

7000 works out if player gets double or triple wordscore.<br />

8000 initialises the array that holds the board.<br />

9000 asks how many players there are, asks their<br />

names, and DIMs arrays to hold their scores,<br />

names and letters.<br />

9500 prints out the board.<br />

9900 routines used when all the letters have been<br />

used. Play continues until no-one can go.<br />

9998 program SAVEd so that it autoruns.<br />

• a a a<br />

a a a<br />

• a<br />

V.V.V<br />

a a a .. .v.v<br />

'.V.V.V<br />

• a a a a a i<br />

a •<br />

a a a<br />

• as<br />

a • i<br />

a a •<br />

a a a i<br />

i a a<br />

a a i<br />

106 ZX COMPUTING DECEMBER/JANUARY 1985

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!