アットウィキロゴ

x2

import 'dart:html';
 
int number;
List<String> post=new List<String>(22);   
List<int> life=new List<int>(100);  
List<int> car=new List<int>(100); 
List<int> age=new List<int>(100); 
 
void main() {
 
  int s,a1,p1;
 
 faststep sub=new faststep();
 sub.makedata();
 post=sub.post;
 life=sub.life;
 car=sub.car;
 age=sub.age;
 
 number=21;
 
 int t;
 
 for(t=1;t<4;t++){
 
 game sub2=new game();
 sub2.life=life;
 sub2.age=age;
 sub2.car=car;
 sub2.number=number;
 sub2.makedata();
 life=sub2.life;
 car=sub2.car;
 age=sub2.age;
 number=sub2.number;
 
 print(number);
 
 }
 
  var q=querySelector("#sample");
    q.text ="ab";
 
}
 
class game{
 
int number;    
List<int> life=new List<int>(100);  
List<int> car=new List<int>(100); 
List<int> age=new List<int>(100); 
List<int> pre=new List<int>(100); 
 
void makedata(){
 
  int a1,p1,s;
 
  for(a1=1;a1<7;a1++){
    death(a1);
  }
 
  for(s=1;s<number+1;s++){
    pre[s]=0;
  }
 
  for(p1=1;p1<16;p1++){
    point(p1);
  }
 
  fresh();
 
  move();  
 
 
}
 
void move(){
 
  int s;
 
for(s=1;s<number+1;s++){  
if(life[s]>50)car[s]=pre[s];  
 
}
for(s=1;s<number+1;s++){  
age[s]=age[s]+1;  
}
 
}
void fresh(){
 
int s;
 
for(s=1;s<7;s++){  
pre[s+number]=15+s;
life[s+number]=100;
age[s+number]=0;
}
 
number=number+6;
 
}
 
void point(int p1){ 
 
  int s,sx,z,sxs;
  List<int> subx=new List<int>(100);   
  int subnumber;
  int maxnumber;
 
  sx=0;
  for(s=1;s<number+1;s++){
    z=0;
    if(life[s]>50)z=z+1;
    if(pre[s]==0)z=z+1;
    if(z==2)sx=sx+1;
    if(z==2)subx[sx]=s;
  }  
  subnumber=sx;
  maxnumber=999;
  sxs=0;
  for(s=1;s<subnumber+1;s++){
 sx=subx[s];
 if(car[sx]<maxnumber)sxs=sx;
 if(car[sx]<maxnumber)maxnumber=car[sx];
  } 
 
  pre[sxs]=p1;   
}
 
void death(int a1){
int s,sx,z,sxs;
List<int> subx=new List<int>(100);   
int subnumber;
int maxnumber;
 
sx=0;
for(s=1;s<number+1;s++){
z=0;
if(life[s]>50)z=z+1;
if(age[s]==a1)z=z+1;
if(z==2)sx=sx+1;
if(z==2)subx[sx]=s;
}
subnumber=sx;
maxnumber=0;
sxs=0;
for(s=1;s<subnumber+1;s++){
sx=subx[s];
if(car[sx]>maxnumber)sxs=sx;
if(car[sx]>maxnumber)maxnumber=car[sx];
}
life[sxs]=0;
 
}
 
}
 
 
class faststep{
 
List<String> post=new List<String>(100);  
List<int> life=new List<int>(100); 
List<int> car=new List<int>(100); 
List<int> age=new List<int>(100); 
 
 
int s,sx,tx;
 
void makedata(){  
 
  for(s=1;s<22;s++){
    life[s]=100;
  }
 
  for(s=1;s<22;s++){
    car[s]=s;
  }
  tx=0;
  for(s=1;s<7;s++){
    for(sx=1;sx<s+1;sx++){
    tx=tx+1;
  age[tx]=7-s;
  }
  }
 
 
  post[0]="引退";
  post[1]="首相";
  post[2]="幹事長";
  post[3]="総務会長";
  post[4]="政調会長";
  post[5]="国対委員長";
  post[6]="幹事代理";
  post[7]="総務代理";
  post[8]="政調代理";
  post[9]="国対代理";
  post[10]="幹事";
  post[11]="幹事";
  post[12]="幹事";
  post[13]="総務";
  post[14]="総務";
  post[15]="総務";
  post[16]="部会";
  post[17]="部会";
  post[18]="部会";
  post[19]="国対";
  post[20]="国対";
  post[21]="国対";
 
}  
}
 
最終更新:2013年11月20日 05:17