//WAVE LATTE VER var w=new Array(14); var x=7,y=4; var px=-2,py; var i=0,s=0; while(i<15){ w[i]=0; i=i+1; } function cw(i,wt){//i BANME WAVE var j; j=i*2; if(w[j+1]==0){ if(rnd(10)>8){ w[j+1]=-rnd(2)-1; w[j]=14; } }else{ if(wt%w[j+1]==0){ lc(w[j]+7,i+8); log(" "); w[j]=w[j]-(w[j+1]<0)+(w[j+1]>0); if(w[j]<1){ w[j+1]=-w[j+1]; } if(w[j]>14){ w[j+1]=0; lc(w[j]+7,i+8); log(" "); } } } } function prw(i){ var j; j=i*2; var lp=0;//local pts var dw;//delta wavepos if(i>0){ dw=w[j]-w[j-2]; if(dw*dw<2){ lp=lp+1; } if(i==py){ dw=w[j]-px; if(dw*dw<2){ lp=lp+1; } } } if(i<7){ dw=w[j]-w[j+2]; if(dw*dw<2){ lp=lp+1; } if(i+2==py){ dw=w[j]-px; if(dw*dw<2){ lp=lp+1; } } } if((w[j]==x)*(i+1==y)*(lp>0)){ beep(lp); x=x+(w[j+1]>0)-(w[j+1]<0); s=s+lp; lc(9,7); log(s); lc(16,7); log("やっほー!"); } lc(w[j]+7,i+8); if(lp<1){ log("^"); } if(lp==1){ log("A"); } if(lp>1){ log("%"); } } function me(){ var k; k=inkey(); if(k!=0){ lc(x+7,y+7); log(" "); lc(16,7); log(" "); } x=x+(x<14)*(k==29)-(x>0)*(k==28); y=y+(y<7)*(k==31)-(y>1)*(k==30); lc(x+7,y+7); log("#"); } function pal(){ if((px==x)*(py==y)){ beep(); px=-2; } if(px<-1){ px=14; py=rnd(7)+1; } if((px>-1)*(rnd(7)==0)){ px=px-1; lc(px+7,py+7); log("* "); } if(px<0){ lc(8,11); log("は゜らそるとんし゛ゃった!\n"); break(); } } function fd(){ var j=6; i=6; while(i<24){ while(j<16){ lc(i,j); log(chr(143)); j=j+1; } j=6; i=i+1; } } function main(){ lc(x+7,y+7); log("#"); lc(7,7); log("S 0"); var wt=0;//wait count while(1){ me(); i=0; while(i<7){ cw(i,wt); if(w[i*2+1]!=0){ prw(i); } i=i+1; } wt=(wt+1)%3; sleep((s<1001)*(100-s/10)); pal(); } } fd(); main();
むむむ。どうもLattePlayer, IchigoLatte(1.1.7)で、動かないようです……。