Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2016/05/22 09:44:01

MixJuice GET URL : kidspod.club/mj/75

PKせん pocket版

福野さんのブログで公開されていたPKせんをpocketに移植してみました

  • No registered tag exist.

SOURCE CODE

1 '*PK* CC BY Copyright (c) 2015 Shiro SAITO
10 CLV:H=PEEK(#FFF)
20 CLS:?"  [===";CHR$(250);"===]"
30 X=6:D=0:LC X,4:?CHR$(233)
40 LC 0,5:?"GOAL=";G;" HI=";H;
50 K=INKEY()
60 IF K=28 D=-1
70 IF K=29 D=1
80 IF D=0 GOTO 50
90 FOR Y=4 TO 2 STEP -1
100 LC X,Y:?" ":X=X+D
110 LC X,Y-1:?CHR$(233):WAIT 5
120 NEXT
130 LC 6,0:?"="
140 R=RND(2)*2-1
150 LC 6+R*3,0:?CHR$(252-R)
160 IF D<>R G=G+1:BEEP 10,3:WAIT 100:GOTO 20
170 BEEP 30,60:LC 0,4:IFG>HPOKE#FFF,G:SAVE

COMMENT