;hsp3.21 ;HitBlow8 #include "Exforce.as" dim ans,8 dim buf,9 wid=304 heit=480 dx=(ginfo_dispx-wid)/2: dy=(ginfo_dispy-heit)/2 screen 0,wid,heit,,dx,dy title "Hit & Hit 8" repeat 9: buf.cnt=cnt+1: loop randomize repeat no=1: num=9 repeat 8 c=rnd(num): ans.cnt=buf.c num-- if c!=num { d=buf.c: buf.c=buf.num: buf.num=d } loop cls: dat="" mes "1〜9の数字を入力してください。\n同じ数字は1回しか使いません。" pos 8: input dat,96,28,8 repeat objsel 0 repeat stick key,0,1: if key&32 { break } wait 1 loop l=strlen(dat) if l<8 { bell } else { hit=0 repeat 8 s=strf("%d",s): s=strmid(dat,cnt,1): s=int(s) if s==ans.cnt { hit++ } loop d=int(d): d=no: d=strf("%02d",d) mes "No."+d+" "+dat+" →"+hit if hit>7 { mes " 正解です" mes " Hit Enter key." repeat stick key,0,1: if key&32 { break } wait 1 loop break } no++ } dat="": objprm 0,dat loop loop