masaakiNakamura

Reversi for IchigoJam

Apr 3rd, 2016
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10 'Ichigo Reversi V1
  2. 50 CLS
  3. 60 FOR X=1TO8:POKE#900+X,#30+X
  4. 70 POKE#900+X*32,#30+X:NEXT
  5. 100 FOR X=1TO8:FOR Y=1TO8
  6. 110 LCX,Y:?CHR$(#90);:NEXT:NEXT
  7. 120 LC4,4:?"OX";:LC4,5:?"XO";
  8. 160 LC0,10:U=#4F:?CHR$(U)
  9. 200 T=U:IFU=#4F:U=#58 ELSE U=#4F
  10. 210 GOTO 800
  11. 300 'Return TO ADDRESS
  12. 310 IFPEEK(Y*32+X+#900)!=#90THEN?"error TRY AGAIN";:BEEP:WAIT(30):GOTO210
  13. 316 C=0
  14. 320 FORI=-1TO1:FORJ=-1TO1
  15. 330 IF(I=0ANDJ=0)GOTO500
  16. 340 K=1
  17. 350 [1]=PEEK(Y*32+X+#900+I*K+J*K*32)
  18. 370 IF[1]=T K=K+1:GOTO350
  19. 380 IF[1]!=U GOTO 500
  20. 400 K=K-1:IFK<1 GOTO500
  21. 410 C=C+1:POKEY*32+X+#900+(J*32+I)*K,U
  22. 420 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. 806 FORX=#A40TO#AAF:POKEX,00:NEXT:LC0,10
  29. 810 ?CHR$(U),"NO BANN."
  30. 815 LC0,11
  31. 820 INPUT "Enter X",X
  32. 830 INPUT "Enter Y",Y
  33. 840 GOTO 300
Add Comment
Please, Sign In to add comment