been working on the shop component of the game--where you sell the oats you have collected in the 'action' part of the game.
this little bit of code will generate a random sequence of 1, 2, or 3 adjectives to place before an English noun.
REM Word order for English adjectives for the purpose of this
REM game:
REM
REM Y 1 2 3 4 5 6
REM Quantity Opinion Size Age Shape Colour Material Noun
- 1 ... generate 3 unique random numbers between 1 and 6
5 W=INT(RND(3))+1
10 DIM H(3)
20 H(1)=INT(RND(6))+1
25 IF H(1)=6 THEN W=1: PRINT "W=";W: GOTO 70
30 FOR I=2 TO 3
40 H(I)=INT(RND(6))+1
45 IF H(2)=6 THEN W=2: PRINT "W=";W: GOTO 70
50 IF H(I)=<H(I-1) THEN GOTO 40
60 NEXT I
70 FOR I=1 TO 3
80 PRINT "H(";I;")= ";H(I)
90 NEXT I
100 PRINT "W=";W
this bit of code will produce a random subjective adjective from a list of 28.
10 J=INT(RND(28))+1
20 RESTORE J
30 READ K$
40 PRINT K$
50 DATA "good","bad","great","horrible","perfect","beautiful","ugly","simple","bald","handsome","gorgeous","plain","cute","messy","fancy","pretty","cheerful","generous","serious","brave","funny","nice","friendly","kind","mean","grumpy","happy","sad"
the idea is that the random sequence of adjectives will switch into each type of adjective subroutine to create a list of randomly named items, which the user will be able to buy in the shop.
- replies
- 0
- announces
- 1
- likes
- 1