アットウィキロゴ

15++9

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