class monopoly{
card: String[] = new Array();
a: number[] = new Array();
b: number[] = new Array();
point: number[] = new Array();
v: number[] = new Array();
money: number[] = new Array();
faststep():void{
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 ]=" ボードウォーク ";
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 ;
}
move(s:number):void{
var n1,n2,m1,m2:number;
n1=6*Math.random();
m1=Math.floor(n1)+1;
n2=6*Math.random();
m2=Math.floor(n2)+1;
this.a[s]=this.a[s]+m1+m2;
if(this.a[s]>40)this.money[s]=this.money[s]+200;
if(this.a[s]>40)this.a[s]=this.a[s]-40;
var sx,h:number;
sx=this.a[s];
h=0;
if(this.b[sx]==0)h=h+1;
if(this.point[sx]>0)h=h+1;
if(h==2)this.money[s]=this.money[s]-this.point[sx];
if(h==2)this.b[sx]=s;
var k:number;
k=this.b[sx];
h=0;
if(this.b[sx]>0)h=h+1;
if(this.point[sx]>0)h=h+1;
if(h==2)this.money[s]=this.money[s]-50;
if(h==2)this.money[k]=this.money[k]+50;
this.tax(s);
}
tax(s:number):void{
if(this.a[s]==5)this.money[s]=this.money[s]-200;
if(this.a[s]==39)this.money[s]=this.money[s]-100;
}
}
最終更新:2016年11月21日 05:16