masaakiNakamura

Reversi fight place for IchigoJam

Apr 4th, 2016
656
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new
  2.  
  3. 10 'Ichigo Reversi V1
  4. 50 CLS:UART0:N=4
  5. 70 FOR X=1TO8:LCX,0:?X;:LC0,X:?X;:FOR Y=1TO8
  6. 110 LCX,Y:?CHR$(#A5);:NEXT:NEXT
  7. 120 LC4,4:?"OX";:LC4,5:?"XO";:LC0,0:?" "
  8. 160 LC0,10:U=#4F
  9. 200 N=N+1:T=U:IFU=#4F:U=#58 ELSE U=#4F
  10. 210 IFN>65:GOTO900:ELSE:GOTO800
  11. 300 IFX=0 GOTO900
  12. 305 IFX=0 GOTO900
  13. 310 VIDEO1:UART2:?X,Y:UART0
  14. 320 IFSCR(X,Y)!=#A5THEN?"TRY AGAIN";:BEEP:WAIT(30):GOTO210
  15. 330 C=0:FORI=-1TO1:FORJ=-1TO1
  16. 340 IF(I=0ANDJ=0)GOTO500
  17. 350 K=1
  18. 360 L=PEEK(Y*32+X+#900+I*K+J*K*32)
  19. 370 IFL=T K=K+1:GOTO360
  20. 380 IFL!=U GOTO 500
  21. 400 K=K-1:IFK<1 GOTO500
  22. 410 C=C+1:POKEY*32+X+#900+(J*32+I)*K,U:GOTO400
  23. 500 NEXT:NEXT
  24. 510 IFC=0 LC0,13:?"Error":WAIT(60):GOTO210
  25. 520 LCX,Y:?CHR$(U);
  26. 530 GOTO 200
  27. 800 'TUGINO TE NYUURYOKU
  28. 810 LC0,-1:UART1:?"#";N:FORY=0TO8:FORX=0TO8:?CHR$(SCR(X,Y));:NEXT:?:NEXT:?"":UART0
  29. 820 FORX=#A40TO#ACF:POKEX,00:NEXT:LC0,10
  30. 830 ?CHR$(U);":"
  31. 840 LC0,11
  32. 850 IFU=#58THEN LRUN1
  33. 860 LRUN2
  34. 900 A=0:B=0
  35. 910 UART2:FORX=1TO8:FORY=1TO8
  36. 920 IFSCR(X,Y)=U A=A+1
  37. 930 IFSCR(X,Y)=T B=B+1
  38. 940 NEXT:NEXT:LC0,14:?CHR$(U);"=";A,CHR$(T);"=";B:?"END"
  39.  
  40. save 0
  41.  
  42.  
  43. new
  44.  
  45. 10 'Ichigo PLAYER
  46. 20 VIDEO0
  47. 30 UART2:LC0,-1
  48. 100 D=0:X=0:Y=0
  49. 110 FOR A=1TO8:FOR B=1TO8
  50. 330 C=0:FORI=-1TO1:FORJ=-1TO1
  51. 340 IF(I=0ANDJ=0)GOTO500
  52. 350 K=1:IFSCR(A,B)!=#A5 GOTO500
  53. 360 L=PEEK(B*32+A+#900+I*K+J*K*32)
  54. 370 IFL=T K=K+1:GOTO360
  55. 380 IFL!=U GOTO 500
  56. 430  C=C+K-1
  57. 500 NEXT:NEXT
  58. 510 IFC>D THEN X=A:Y=B:D=C:GOTO540
  59. 515 IF C=0 GOTO 540
  60. 520 IF C=D IF RND(10)>5 X=A:Y=B:D=C
  61. 540 NEXT:NEXT
  62. 800 LRUN0,300
  63.  
  64. save 1
  65.  
  66. new
  67.  
  68. 10 'Ichigo reversi MAN
  69. 20 INPUT"ENTER X:",X
  70. 30 INPUT"ENIRT Y:",Y
  71. 40 LRUN0,300
  72.  
  73. save 2
  74.  
  75. lrun0
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×