sell pubxx

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
 
<script>
 
var pl=new Array(); 
var card=new Array(); 
var m=new Array(); 
var re=new Array(); 
var point=new Array(); 
var v=new Array(); 
var x=new Array(); 
var col=new Array();
 
function faststep(){
 
for(s=1;s<41;s++){
x[s]=0;
col[s]="";
}
 
for(s=1;s<41;s++){
re[s]=new Array();
}
 
for(s=1;s<41;s++){
re[s][0]=0;
}
 
re[1][1]=0;
re[1][2]=0;
re[1][3]=0;
re[1][4]=0;
re[1][5]=0;
re[2][1]=10;
re[2][2]=30;
re[2][3]=90;
re[2][4]=160;
re[2][5]=250;
re[3][1]=0;
re[3][2]=0;
re[3][3]=0;
re[3][4]=0;
re[3][5]=0;
re[4][1]=20;
re[4][2]=60;
re[4][3]=180;
re[4][4]=320;
re[4][5]=450;
re[5][1]=0;
re[5][2]=0;
re[5][3]=0;
re[5][4]=0;
re[5][5]=0;
re[6][1]=0;
re[6][2]=0;
re[6][3]=0;
re[6][4]=0;
re[6][5]=0;
re[7][1]=30;
re[7][2]=90;
re[7][3]=270;
re[7][4]=400;
re[7][5]=550;
re[8][1]=0;
re[8][2]=0;
re[8][3]=0;
re[8][4]=0;
re[8][5]=0;
re[9][1]=30;
re[9][2]=90;
re[9][3]=270;
re[9][4]=400;
re[9][5]=550;
re[10][1]=40;
re[10][2]=100;
re[10][3]=300;
re[10][4]=450;
re[10][5]=600;
re[11][1]=0;
re[11][2]=0;
re[11][3]=0;
re[11][4]=0;
re[11][5]=0;
re[12][1]=50;
re[12][2]=150;
re[12][3]=450;
re[12][4]=625;
re[12][5]=750;
re[13][1]=0;
re[13][2]=0;
re[13][3]=0;
re[13][4]=0;
re[13][5]=0;
re[14][1]=50;
re[14][2]=150;
re[14][3]=450;
re[14][4]=625;
re[14][5]=750;
re[15][1]=60;
re[15][2]=180;
re[15][3]=500;
re[15][4]=700;
re[15][5]=900;
re[16][1]=0;
re[16][2]=0;
re[16][3]=0;
re[16][4]=0;
re[16][5]=0;
re[17][1]=70;
re[17][2]=200;
re[17][3]=550;
re[17][4]=750;
re[17][5]=950;
re[18][1]=0;
re[18][2]=0;
re[18][3]=0;
re[18][4]=0;
re[18][5]=0;
re[19][1]=70;
re[19][2]=200;
re[19][3]=550;
re[19][4]=750;
re[19][5]=950;
re[20][1]=80;
re[20][2]=220;
re[20][3]=600;
re[20][4]=800;
re[20][5]=1000;
re[21][1]=0;
re[21][2]=0;
re[21][3]=0;
re[21][4]=0;
re[21][5]=0;
re[22][1]=90;
re[22][2]=250;
re[22][3]=700;
re[22][4]=875;
re[22][5]=1050;
re[23][1]=0;
re[23][2]=0;
re[23][3]=0;
re[23][4]=0;
re[23][5]=0;
re[24][1]=90;
re[24][2]=250;
re[24][3]=700;
re[24][4]=875;
re[24][5]=1050;
re[25][1]=100;
re[25][2]=300;
re[25][3]=750;
re[25][4]=925;
re[25][5]=1100;
re[26][1]=0;
re[26][2]=0;
re[26][3]=0;
re[26][4]=0;
re[26][5]=0;
re[27][1]=110;
re[27][2]=330;
re[27][3]=800;
re[27][4]=975;
re[27][5]=1150;
re[28][1]=110;
re[28][2]=330;
re[28][3]=800;
re[28][4]=975;
re[28][5]=1150;
re[29][1]=0;
re[29][2]=0;
re[29][3]=0;
re[29][4]=0;
re[29][5]=0;
re[30][1]=120;
re[30][2]=360;
re[30][3]=850;
re[30][4]=1025;
re[30][5]=1200;
re[31][1]=0;
re[31][2]=0;
re[31][3]=0;
re[31][4]=0;
re[31][5]=0;
re[32][1]=130;
re[32][2]=390;
re[32][3]=900;
re[32][4]=1100;
re[32][5]=1275;
re[33][1]=130;
re[33][2]=390;
re[33][3]=900;
re[33][4]=1100;
re[33][5]=1275;
re[34][1]=0;
re[34][2]=0;
re[34][3]=0;
re[34][4]=0;
re[34][5]=0;
re[35][1]=150;
re[35][2]=450;
re[35][3]=1000;
re[35][4]=1200;
re[35][5]=1400;
re[36][1]=0;
re[36][2]=0;
re[36][3]=0;
re[36][4]=0;
re[36][5]=0;
re[37][1]=0;
re[37][2]=0;
re[37][3]=0;
re[37][4]=0;
re[37][5]=0;
re[38][1]=175;
re[38][2]=500;
re[38][3]=1100;
re[38][4]=1300;
re[38][5]=1500;
re[39][1]=0;
re[39][2]=0;
re[39][3]=0;
re[39][4]=0;
re[39][5]=0;
re[40][1]=200;
re[40][2]=500;
re[40][3]=1400;
re[40][4]=1700;
re[40][5]=2000;
 
re[2][0]=2;
re[4][0]=4;
col[2]="ブラウン";
col[4]="ブラウン";
 
re[7][0]=6;
re[9][0]=6;
re[10][0]=8;
col[7]="ライトブルー";
col[9]="ライトブルー";
col[10]="ライトブルー";
 
 
re[12][0]=10;
re[14][0]=10;
re[15][0]=12;
col[12]="ライトパープル";
col[14]="ライトパープル";
col[15]="ライトパープル";
 
 
re[17][0]=14;
re[19][0]=14;
re[20][0]=16;
col[17]="オレンジ";
col[19]="オレンジ";
col[20]="オレンジ";
 
re[22][0]=18;
re[24][0]=18;
re[25][0]=20;
col[22]="レッド";
col[24]="レッド";
col[25]="レッド";
 
re[27][0]=22;
re[28][0]=22;
re[30][0]=24;
col[27]="イエロー";
col[28]="イエロー";
col[30]="イエロー";
 
re[32][0]=26;
re[33][0]=26;
re[35][0]=28;
col[32]="グリーン";
col[33]="グリーン";
col[35]="グリーン";
 
re[38][0]=35;
re[40][0]=50;
col[38]="ダークブルー";
col[40]="ダークブルー";
 
 
point[	1	]=	0	;
point[	2	]=	60	;
point[	3	]=	0	;
point[	4	]=	60	;
point[	5	]=	0	;
point[	6	]=	200	;
point[	7	]=	100	;
point[	8	]=	0	;
point[	9	]=	100	;
point[	10	]=	120	;
point[	11	]=	0	;
point[	12	]=	140	;
point[	13	]=	150	;
point[	14	]=	140	;
point[	15	]=	160	;
point[	16	]=	200	;
point[	17	]=	180	;
point[	18	]=	0	;
point[	19	]=	180	;
point[	20	]=	200	;
point[	21	]=	0	;
point[	22	]=	220	;
point[	23	]=	0	;
point[	24	]=	220	;
point[	25	]=	240	;
point[	26	]=	200	;
point[	27	]=	260	;
point[	28	]=	260	;
point[	29	]=	150	;
point[	30	]=	280	;
point[	31	]=	0	;
point[	32	]=	300	;
point[	33	]=	300	;
point[	34	]=	0	;
point[	35	]=	320	;
point[	36	]=	200	;
point[	37	]=	0	;
point[	38	]=	350	;
point[	39	]=	0	;
point[	40	]=	400	;
 
v[	1	]=	0	;
v[	2	]=	50	;
v[	3	]=	0	;
v[	4	]=	50	;
v[	5	]=	0	;
v[	6	]=	0	;
v[	7	]=	50	;
v[	8	]=	0	;
v[	9	]=	50	;
v[	10	]=	50	;
v[	11	]=	0	;
v[	12	]=	100	;
v[	13	]=	0	;
v[	14	]=	100	;
v[	15	]=	100	;
v[	16	]=	0	;
v[	17	]=	100	;
v[	18	]=	0	;
v[	19	]=	100	;
v[	20	]=	100	;
v[	21	]=	0	;
v[	22	]=	150	;
v[	23	]=	0	;
v[	24	]=	150	;
v[	25	]=	150	;
v[	26	]=	0	;
v[	27	]=	150	;
v[	28	]=	150	;
v[	29	]=	0	;
v[	30	]=	150	;
v[	31	]=	0	;
v[	32	]=	200	;
v[	33	]=	200	;
v[	34	]=	0	;
v[	35	]=	200	;
v[	36	]=	0	;
v[	37	]=	0	;
v[	38	]=	200	;
v[	39	]=	0	;
v[	40	]=	200	;
 
card[	1	]="	GO	";
card[	2	]="	地中海通り	";
card[	3	]="	共同基金	";
card[	4	]="	バルティック通り	";
card[	5	]="	所得税	";
card[	6	]="	リーディング鉄道	";
card[	7	]="	オリエンタル通り	";
card[	8	]="	チャンス	";
card[	9	]="	バーモント通り	";
card[	10	]="	コネチカット通り	";
card[	11	]="	刑務所、刑務所見学	";
card[	12	]="	セントチャールズプレース	";
card[	13	]="	電力会社	";
card[	14	]="	ステーツ通り	";
card[	15	]="	バージニア通り	";
card[	16	]="	ペンシルバニア鉄道	";
card[	17	]="	セントジェームスプレース	";
card[	18	]="	共同基金	";
card[	19	]="	テネシー通り	";
card[	20	]="	ニューヨーク通り	";
card[	21	]="	フリーパーキング	";
card[	22	]="	ケンタッキー通り	";
card[	23	]="	チャンス	";
card[	24	]="	インディアナ通り	";
card[	25	]="	イリノイ通り	";
card[	26	]="	B&O 鉄道	";
card[	27	]="	アトランティック通り	";
card[	28	]="	ベントノール通り	";
card[	29	]="	水道会社	";
card[	30	]="	マービンガーデン	";
card[	31	]="	GO TO JAIL	";
card[	32	]="	パシフィック通り	";
card[	33	]="	ノースキャロライナ通り	";
card[	34	]="	共同基金	";
card[	35	]="	ペンシルバニア通り	";
card[	36	]="	ショートライン鉄道	";
card[	37	]="	チャンス	";
card[	38	]="	パークプレース	";
card[	39	]="	物品税	";
card[	40	]="	ボードウォーク	"; 
 
col[13]="公共会社";
col[29]="公共会社";
 
col[6]="鉄道会社";
col[16]="鉄道会社";
col[26]="鉄道会社";
col[36]="鉄道会社";
 
}
 
function sample(){
 
faststep();
 
mode=4;
pl[1]=1;
pl[2]=1;
pl[3]=1;
pl[4]=1;
 
m[1]=1500;
m[2]=1500;
m[3]=1500;
m[4]=1500;
 
var timer;
var delay = 100;
 
var loop = function () {
 
mode=mode+1;
if(mode>4)mode=1;
 
n1=6*Math.random();
d1=Math.floor(n1)+1;
n1=6*Math.random();
d2=Math.floor(n1)+1;
 
pl[mode]=pl[mode]+d1+d2;
if(pl[mode]>40)m[mode]=m[mode]+250;
if(pl[mode]>40)pl[mode]=pl[mode]-40;
 
buy(pl[mode],mode); 
sell(pl[mode],mode); 
buy_line(pl[mode],mode); 
buy_pub(pl[mode],mode); 
sell_line(pl[mode],mode); 
sell_pub(pl[mode],mode,d1,d2);
 
p1=pl[1];
p2=pl[2];
p3=pl[3];
p4=pl[4];
 
str=card[p1]+"+"+card[p2]+"+"+card[p3]+"+"+card[p4];
str=str+"+"+m[1]+"+"+m[2]+"+"+m[3]+"+"+m[4];
 
$("#memo").html(str);
 
 
    clearTimeout(timer);
    timer = setTimeout(loop, delay);
}
 
loop();
 
}
 
function buy(x1,mode){
 
h=0;
if(x1==2)h=h+1;
if(x1==4)h=h+1;
if(x1==7)h=h+1;
if(x1==9)h=h+1;
if(x1==10)h=h+1;
if(x1==12)h=h+1;
if(x1==14)h=h+1;
if(x1==15)h=h+1;
if(x1==16)h=h+1;
if(x1==17)h=h+1;
if(x1==19)h=h+1;
if(x1==20)h=h+1;
if(x1==22)h=h+1;
if(x1==24)h=h+1;
if(x1==25)h=h+1;
if(x1==27)h=h+1;
if(x1==28)h=h+1;
if(x1==30)h=h+1;
if(x1==32)h=h+1;
if(x1==33)h=h+1;
if(x1==35)h=h+1;
if(x1==36)h=h+1;
if(x1==38)h=h+1;
if(x1==40)h=h+1;
 
if(x[x1]==0)h=h+1;
if(h==2)m[mode]=m[mode]-point[x1];
if(h==2)x[x1]=mode;
 
}
 
 
function buy_line(x1,mode){
 
h=0;
if(x1==6)h=h+1;
if(x1==16)h=h+1;
if(x1==26)h=h+1;
if(x1==36)h=h+1;
 
if(x[x1]==0)h=h+1;
if(h==2)m[mode]=m[mode]-point[x1];
if(h==2)x[x1]=mode;
 
}
 
function buy_pub(x1,mode){
 
h=0;
if(x1==13)h=h+1;
if(x1==29)h=h+1;
 
if(x[x1]==0)h=h+1;
if(h==2)m[mode]=m[mode]-point[x1];
if(h==2)x[x1]=mode;
 
}
 
 
function sell(x1,mode){
 
h=0;
if(x1==1)h=h+1;
if(x1==4)h=h+1;
if(x1==7)h=h+1;
if(x1==9)h=h+1;
if(x1==10)h=h+1;
if(x1==12)h=h+1;
if(x1==14)h=h+1;
if(x1==15)h=h+1;
if(x1==16)h=h+1;
if(x1==17)h=h+1;
if(x1==19)h=h+1;
if(x1==20)h=h+1;
if(x1==22)h=h+1;
if(x1==24)h=h+1;
if(x1==25)h=h+1;
if(x1==27)h=h+1;
if(x1==28)h=h+1;
if(x1==30)h=h+1;
if(x1==32)h=h+1;
if(x1==33)h=h+1;
if(x1==35)h=h+1;
if(x1==36)h=h+1;
if(x1==38)h=h+1;
if(x1==40)h=h+1;
 
mx=x[x1];
if(x[x1]>0)h=h+1;
if(h==2)m[mode]=m[mode]-re[x1][0];
if(h==2)m[mx]=m[mx]+re[x1][0];
 
}
 
function sell_line(x1,mode){
 
h=0;
if(x1==1)h=h+1;
if(x1==4)h=h+1;
if(x1==7)h=h+1;
if(x1==9)h=h+1;
 
mx=x[x1];
if(x[x1]>0)h=h+1;
if(h==2)m[mode]=m[mode]-25;
if(h==2)m[mx]=m[mx]+25;
 
}
function sell_pub(x1,mode,d1,d2){
 
h=0;
if(x1==16)h=h+1;
if(x1==29)h=h+1;
 
mx=x[x1];
if(x[x1]>0)h=h+1;
if(h==2)m[mode]=m[mode]-4*(d1+d2);
if(h==2)m[mx]=m[mx]+4*(d1+d2);
 
}
</script>
最終更新:2018年06月08日 16:46