home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 August
/
1993-08.d64
/
chess.fb
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
608b
|
28 lines
10 poke53280,6:poke53281,6:print"[147]"
20 input"number of games played";g
30 deffnf(x)=(99^(x/800))/(1+(99^(x/800))):rem rating formula
40 input"your rating";r
50 print"opponents' ratings?"
60 forb=1tog
70 input o:if o<1 then restore:end
80 x=r-o
90 if x<-800 then x=-800
100 d=d+fnf(x)
110 next
120 input"your score";s:s=s-d
130 if r<2100 then 170
140 if r<2400 then 160
150 s=s*16:goto 220
160 s=s*24:goto 220
170 s=s*32:if r+s+.5>int(2099) then 220
180 if g<4 then g=4
190 if s>32+(3*(g-4))and r+s+s-(32+(3*(g-4)))<2100 then 210
200 goto220
210 r=r+s+s-(32+(3*(g-4))):goto230
220 r=r+s
230 print:print"your new rating is";int(r+.5)
240 print:print"again?"
250 get a$: if a$=""then 250
260 if a$<>"y" then end
270 goto10