var x=new Array();
var y=new Array();
function sample(){
x[1]=250;
x[2]=1500;
x[3]=-200;
x[4]=600;
y[1]=250;
y[2]=0;
y[3]=-200;
y[4]=0;
z=0;
y1=op_y(1);
m1=f(1,y1);
x1=x[m1];
y1=op_y(2);
m2=f(2,y1);
x2=x[m2];
$("#memo").html(x1+","+x2);
}
function op_y(s1){
m1=f(s1,1);
y1=y[m1];
m2=f(s1,2);
y2=y[m2];
var sx;
sx=1;
if(y2>y1)sx=2;
return sx;
}
function op_x(s2){
m1=f(1,s2);
x1=x[m1];
m2=f(2,s2);
x2=x[m2];
var sx;
sx=1;
if(x2>x1)sx=2;
return sx;
}
function f(x1,y1){
sx=0;
h=0;
if(x1==1)h=h+1;
if(y1==1)h=h+1;
if(h==2)sx=1;
h=0;
if(x1==1)h=h+1;
if(y1==2)h=h+1;
if(h==2)sx=2;
h=0;
if(x1==2)h=h+1;
if(y1==1)h=h+1;
if(h==2)sx=3;
h=0;
if(x1==2)h=h+1;
if(y1==2)h=h+1;
if(h==2)sx=4;
return sx;
}
最終更新:2016年06月23日 09:20