!<その7> IF iss=0 THEN DRAW put(INT(m/2),INT(n/2+1),b) ! 初期の石の配置 DRAW put(INT(m/2+1),INT(n/2),b) DRAW put(INT(m/2),INT(n/2),w) DRAW put(INT(m/2+1),INT(n/2+1),w) ELSEIF m/2<>INT(m/2) AND n/2=INT(n/2) THEN DRAW put(INT(m/2),INT(n/2),w) DRAW put(INT(m/2+1),INT(n/2),w) DRAW put(INT(m/2),INT(n/2+1),b) DRAW put(INT(m/2+1),INT(n/2+1),b) ELSE DRAW put(INT(m/2),INT(n/2),b) DRAW put(INT(m/2),INT(n/2+1),b) DRAW put(INT(m/2+1),INT(n/2),w) DRAW put(INT(m/2+1),INT(n/2+1),w) END IF END PICTURE ! startの終端 SUB mem_error ! メモリーオーバー BEEP SET TEXT COLOR "RED" SET TEXT JUSTIFY "CENTER","HALF" SET TEXT HEIGHT 3 PLOT TEXT ,AT 20,20 : "memory over STOP !!" PLOT TEXT ,AT 20,26 : "マス数を減らして !!" STOP END SUB END
MODULE init PUBLIC SUB menu,choose,radio SHARE NUMERIC x,a2,a3,a4,a5,bb EXTERNAL SUB menu ! 設定メニュー DECLARE EXTERNAL NUMERIC m,n,b,w,board,ground,iss,putcol,pix,pixd(,) DECLARE EXTERNAL STRING cc$() DECLARE EXTERNAL PICTURE box.button01,box.rect SET WINDOW 0,40,46,1 SET DRAW MODE HIDDEN LET a1=9 ! 項目名の右端 LET a2=a1-1 LET a3=2 ! ボタン間の距離 LET a4=0.45 ! ラジオボタンの半径 LET a5=0.3 ! 選択点の半径 DRAW rect(8) WITH SCALE(40,46)*SHIFT(0,1) ! 背景色(灰) SET TEXT COLOR 2 SET TEXT HEIGHT 1.7 SET TEXT JUSTIFY "CENTER","BOTTOM" PLOT TEXT ,AT 40/2,4 : "<< REVERSI Lesson 設定メニュー >>" SET TEXT COLOR 1 SET TEXT HEIGHT 1 LET bb=2 ! 選択点の色(青) LET m9=16 DIM st$(3 TO m9) FOR i=3 TO m9 LET st$(i)=STR$(i) NEXT i SET TEXT JUSTIFY "RIGHT","BOTTOM" LET L1=6 LET L2=9 PLOT TEXT ,AT a1,L1+0.5 : "マス数(横) :" PLOT TEXT ,AT a1,L2+0.5 : "マス数(縦) :" CALL radio(L1,st$,3,m9,m) CALL radio(L2,st$,3,m9,n) LET L3=13 LET L4=16 PLOT TEXT ,AT a1,L3+0.5 : "先手の石の色 :" PLOT TEXT ,AT a1,L4+0.5 : "後手の石の色 :" CALL radio(L3,cc$,0,9,b) CALL radio(L4,cc$,0,9,w) LET L5=20 PLOT TEXT ,AT a1,L5+0.5 : "盤面の色 :" CALL radio(L5,cc$,2,11,board) LET L6=24 PLOT TEXT ,AT a1,L6+0.5 : "背景の色 :" CALL radio(L6,cc$,2,11,ground) SET TEXT JUSTIFY "RIGHT","BASE" LET L7=28.5 PLOT TEXT ,AT a1,L7 : "初期の配置 :" SET TEXT JUSTIFY "LEFT","BASE" PLOT TEXT ,AT 11,L7 : "交差" PLOT TEXT ,AT 17,L7 : "平行" DRAW CIRCLE WITH SCALE(a4)*SHIFT(10,L7-a4) DRAW CIRCLE WITH SCALE(a4)*SHIFT(16,L7-a4) SET AREA COLOR 0 PAINT 10,L7-a4 PAINT 16,L7-a4 SET AREA COLOR bb IF putcol<>0 THEN LET a6=10 ELSE LET a6=16 DRAW DISK WITH SCALE(a5)*SHIFT(a6,L7-a4) !<その8>に続く
|