home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1989 April / 64er_Magazin_89-04_1989_Markt__Technik_de.d64 / zahlenschach (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  671b  |  21 lines

  1. 1 poke53280,12:poke53281,12:print"[147]spieler:"tab(20)"computer:":dima(8,8)
  2. 2 fori=1to8:forj=1to8:a(i,j)=int(rnd(0)*99)+1:ifa(i,j)<10thenprint" ";:b=1021
  3. 3 printa(i,j);:next:print"":next:x=int(rnd(0)*8)+1:y=int(rnd(0)*8)+1:f=55293
  4. 4 l=7:gosub19:getj$:ifj$=chr$(13)anda(y,x)<>0thens=s+a(y,x):print"[155]"tab(8)s
  5. 5 ifj$=chr$(13)anda(y,x)<>0thena(y,x)=0:l=6:gosub19:gosub20:goto9
  6. 6 ifj$=""thenl=6:gosub19:y=y+1:ify=9theny=1
  7. 7 ifj$="[145]"thenl=6:gosub19:y=y-1:ify=0theny=8
  8. 8 goto4
  9. 9 j=-100:fori=1to8:e=a(y,i):ife=0then15
  10. 10 h=0:form=1to8:ifm=ythen14
  11. 11 z=a(m,i):ifz=0then14
  12. 12 ifz>hthenh=z
  13. 13 g=e-h
  14. 14 nextm:ifg>jthenj=g:k=i
  15. 15 nexti:t=t+a(y,k):a(y,k)=0:print"[155]"tab(29)t:x=k:l=7:gosub19:fori=1to999:next
  16. 16 gosub20:q=0:fori=1to8:ifa(i,x)=0thenq=q+1
  17. 17 next:ifq=8thenend
  18. 18 goto4
  19. 19 c=y*80+x*4+f:pokec,l:pokec+1,l:return
  20. 20 c=y*80+x*4+b:pokec,45:pokec+1,45:return
  21.