var x=new Array();
var y=new Array();
function sample(){
x[1]=500;
x[2]=-8000;
x[3]=6400;
x[4]=-800;
y[1]=500;
y[2]=6400;
y[3]=-8000;
y[4]=-800;
z=0;
x1=op_x(1);
y1=op_y(x1);
if(y1==1)z=1;
x1=op_x(2);
y1=op_y(x1);
if(y1==2)z=2;
$("#memo").html(op_x(z)+","+z);
}
function op(){
n1=select(1);
m1=f(1,n1);
x1=x[m1];
n2=select(2);
m2=f(2,n2);
x2=x[m2];
var sxs;
sxs=1;
if(x2>x1)sxs=2;
return sxs;
}
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:02