アットウィキロゴ

dart but

<!DOCTYPE html>
 
<html>
  <head>
    <meta charset="utf-8">
    <title>ランド</title>
  </head>
  <body>
    <div>
    <button id="But"></button>
  </div>
 
 
      <p id="sample"></p>
    <script type="application/dart" src="rand.dart"></script>
    <script src="packages/browser/dart.js"></script>
  </body>
</html>
 
 
 
 
import 'dart:html';
 
ButtonElement gen2;
List<String> post=new List<String>(100);
List<int> life=new List<int>(100);
List<int> car=new List<int>(100);
 
void main() {
 
 
  int s,sx;
 
 fast sub=new fast();
 sub.post=post;
 sub.life=life;
 sub.car=car;
 sub.makedata();
 post=sub.post;
 life=sub.life;
 car=sub.car;
 
 s=15;
 sx=car[s];
 
 gen2 = querySelector('#But');
 gen2.onClick.listen(play);
 
}
void play(Event e){
 
  querySelector('#sample').text =post[10]; 
}
 
 
class fast{
 
List<String> post=new List<String>(100);
List<int> life=new List<int>(100);  
List<int> car=new List<int>(100);  
 
void makedata(){
 
  int s;
 
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]="松本代官";
 
for(s=1;s<22;s++){
life[s]=100;
}
 
for(s=1;s<22;s++){
car[s]=s;
}
 
 
 
}
}
最終更新:2013年11月17日 22:21