!<その4> PICTURE turn(t) ! 手番表示 SET DRAW MODE HIDDEN DRAW rect(ground) WITH SCALE(0.9,1.2)*SHIFT(m+1.1,n/2) PLOT TEXT ,AT m+1.5, n/2+0.4:cc$(t)&"番" SET LINE WIDTH 1 SET AREA COLOR t IF bp>=15 THEN DRAW CIRCLE WITH SCALE(0.2)*SHIFT(m+1.5,n/2+0.9) PAINT m+1.5,n/2+0.9 ELSE DRAW DISK WITH SCALE(0.2)*SHIFT(m+1.5,n/2+0.9) END IF SET DRAW MODE EXPLICIT END PICTURE PICTURE pass ! パス BEEP DRAW rect(ground) WITH SCALE(0.95,1.2)*SHIFT(m+1.05,n/2) DRAW button01(1,ground,"PASS",bth,ground) WITH SCALE(bw,bh)*SHIFT(px,py) PLOT TEXT ,AT m+1.5,n/2+0.6:"パス!" WAIT DELAY 0.8 IF pass_on=1 THEN DRAW button01(0,5,"PASS",bth,ground) WITH SCALE(bw,bh)*SHIFT(px,py) LET pass_on=0 END IF IF c=b THEN LET c=w ELSE LET c=b DRAW turn(c) END PICTURE SUB pass_off ! 無条件パスの解除 SET DRAW MODE HIDDEN !DRAW rect(ground) WITH SCALE(bw+0.1,bh+0.1)*SHIFT(px-0.05,py-0.05) DRAW button01(0,5,"PASS",bth,ground) WITH SCALE(bw,bh)*SHIFT(px,py) LET pass_auto=0 SET DRAW MODE EXPLICIT END SUB SUB backstart ! 最初に戻る BEEP FOR i=1 TO m FOR j=1 TO n IF r(i,j)<>rr(ic,i,j) THEN DRAW put(i,j,rr(ic,i,j)) NEXT j NEXT i CALL scan DRAW counter LET c=b DRAW turn(c) END SUB SUB back ! 一手戻る BEEP FOR i=1 TO m FOR j=1 TO n IF r(i,j)<>rr(count-1,i,j) THEN DRAW put(i,j,rr(count-1,i,j)) NEXT j NEXT i CALL scan DRAW counter IF hand-1<>0 AND kif(hand-1,2)<>0 AND putcol<>0 THEN DRAW putat(kif(hand-1,2),kif(hand-1,3)) LET c=kif(hand,1) DRAW turn(c) END SUB SUB goes ! 一手進む BEEP FOR i=1 TO m FOR j=1 TO n IF r(i,j)<>rr(count+1,i,j) THEN DRAW put(i,j,rr(count+1,i,j)) NEXT j NEXT i IF kif(hand,2)<>0 AND putcol<>0 THEN DRAW putat(kif(hand,2),kif(hand,3)) CALL scan DRAW counter IF hand<=m*n-ic AND kif(hand,2)<>0 THEN LET c=kif(hand,1) ELSEIF kif(hand-1,1)=b THEN LET c=w ELSE LET c=b END IF DRAW turn(c) END SUB SUB goesmaxhand ! 最後に進む BEEP FOR i=1 TO m FOR j=1 TO n IF r(i,j)<>rr(maxhand+ic,i,j) THEN DRAW put(i,j,rr(maxhand+ic,i,j)) NEXT j NEXT i IF kif(maxhand,2)<>0 AND putcol<>0 THEN DRAW putat(kif(maxhand,2),kif(maxhand,3)) CALL scan DRAW counter IF kif(maxhand,1)=b THEN LET c=w ELSE LET c=b DRAW turn(c) END SUB !<その5>に続く
|