var namex=new Array();
var pic=new Array();
var point=new Array();
var s,sx;
var mode;
var x,y,z;
function sample(){
mes="スタートボタンを押して";
for(s=1;s<35;s++){
point[s]=0;
}
point[1]=1;
point[2]=1;
point[3]=1;
point[4]=2;
point[5]=1;
point[6]=1;
point[7]=1;
point[8]=2;
point[9]=1;
point[10]=1;
point[11]=1;
point[12]=1;
point[13]=2;
point[14]=1;
point[15]=1;
point[16]=1;
point[17]=1;
point[18]=1;
point[19]=1;
point[20]=1;
point[21]=1;
point[22]=1;
point[23]=1;
point[24]=1;
point[25]=1;
point[26]=1;
point[27]=1;
point[28]=1;
point[29]=1;
point[30]=1;
point[31]=1;
point[32]=1;
point[33]=1;
point[34]=1;
namex[1]="浜浦彩乃";
namex[2]="田口夏実";
namex[3]="小川麗奈";
namex[4]="山岸理子";
namex[5]="野村みな美";
namex[6]="一岡伶奈";
namex[7]="加賀楓";
namex[8]="岸本ゆめの";
namex[9]="和田桜子";
namex[10]="藤井梨央";
namex[11]="井上ひかる";
namex[12]="横川夢衣";
namex[13]="新沼希空";
namex[14]="段原瑠々";
namex[15]="船木結";
namex[16]="竹村未羽";
namex[17]="浅倉樹々";
namex[18]="小野田紗栞";
namex[19]="橋本渚";
namex[20]="堀江葵月";
namex[21]="小片リサ";
namex[22]="島野萌々子";
namex[23]="広瀬彩海";
namex[24]="谷本安美";
namex[25]="井上玲音";
namex[26]="高瀬くるみ";
namex[27]="小野瑞歩";
namex[28]="仲野りおん";
namex[29]="梁川奈々美";
namex[30]="前田こころ";
namex[31]="秋山眞緒";
namex[32]="金津美月";
namex[33]="笠原桃奈";
namex[34]="岡本帆乃花";
pic[1]="http://cdn.helloproject.com/img/artist/m/559aee03d9c0b9b1cfda0d6a1c676eb615bd36f0.jpg";
pic[2]="http://cdn.helloproject.com/img/artist/m/abd6a361b27acd3c3a26b70f4655de9bc67bce54.jpg";
pic[3]="http://cdn.helloproject.com/img/artist/m/3ff0b0be50be5cb94ff54e836a76d930dc4e1abc.jpg";
pic[4]="http://cdn.helloproject.com/img/artist/m/f0d828ea18a95278f9fc88ebe8819e259cda255f.jpg";
pic[5]="http://cdn.helloproject.com/img/artist/m/8800f4e903a2aa19b0acac73df349baa6db8e6eb.jpg";
pic[6]="http://cdn.helloproject.com/img/artist/m/10d15735f9d9d80fd5cc73c451ed4aa266f1f6d1.jpg";
pic[7]="http://cdn.helloproject.com/img/artist/m/14f1d7211de35f942da3ec8e3e6672e26f3f3b20.jpg";
pic[8]="http://cdn.helloproject.com/img/artist/m/4ab8b6a4866e2108a7d7d16d8e490f8c3449409b.jpg";
pic[9]="http://cdn.helloproject.com/img/artist/m/83cfeb75d6ad40a7bf4ef8ee809b85d79f346855.jpg";
pic[10]="http://cdn.helloproject.com/img/artist/m/62507ada3a6bbc2faba8809d65aab1e69bb4f8d1.jpg";
pic[11]="http://cdn.helloproject.com/img/artist/m/5ac9871afc746c57b5e9a7cd47d8a8b0315aea9f.jpg";
pic[12]="http://cdn.helloproject.com/img/artist/m/ccfeb8bfee4786e82d371ee889a0a57edf0093f8.jpg";
pic[13]="http://cdn.helloproject.com/img/artist/m/0084b3087964efe27ee29cf95e4b6ff73827f1bd.jpg";
pic[14]="http://cdn.helloproject.com/img/artist/m/430308cfb93b05a9660c2f35545b11f9439ea637.jpg";
pic[15]="http://cdn.helloproject.com/img/artist/m/1c27c2ca148e9c497428153579951e5ac48c8fdf.jpg";
pic[16]="http://cdn.helloproject.com/img/artist/m/1a4e2a33cf168d34471bf9d2841837ce543cf46f.jpg";
pic[17]="http://cdn.helloproject.com/img/artist/m/c96efac688ef1ed430b3d4dc27b4a02ae4e52d59.jpg";
pic[18]="http://cdn.helloproject.com/img/artist/m/e647a707fc2e40ac5c57a774dbf6abfbc8f2c472.jpg";
pic[19]="http://cdn.helloproject.com/img/artist/m/77a23d340457d2adf6b93213614bf050a49a6f8b.jpg";
pic[20]="http://cdn.helloproject.com/img/artist/m/9d1b7783e1287abbdbb92fa7980613aef7d9ca5a.jpg";
pic[21]="http://cdn.helloproject.com/img/artist/m/7d476149d49ea5ed5f9df4da2deaad7cc3a47b6d.jpg";
pic[22]="http://cdn.helloproject.com/img/artist/m/65ff5e2a4f0f8e1d8a4005886feaca8f1dea15d0.jpg";
pic[23]="http://cdn.helloproject.com/img/artist/m/53ab134f8cbb6766dbd10f02cb963e5c1901119a.jpg";
pic[24]="http://cdn.helloproject.com/img/artist/m/d194df5c2dc9e46ccd660e29cda20cb3cd92d553.jpg";
pic[25]="http://cdn.helloproject.com/img/artist/m/293f64951786f4ab16affdb94c6da4f79f3e5ba4.jpg";
pic[26]="http://cdn.helloproject.com/img/artist/m/64ea0bbba240f592700cfbe3691934f2ff130774.jpg";
pic[27]="http://cdn.helloproject.com/img/artist/m/56f76f44dcbde35405630c5de47c959118ccf063.jpg";
pic[28]="http://cdn.helloproject.com/img/artist/m/42bf0d243319884048d949910e6ac3abc69af193.jpg";
pic[29]="http://cdn.helloproject.com/img/artist/m/d200ad5fbdffbcfe62fda28f6da2f4b497868e7e.jpg";
pic[30]="http://cdn.helloproject.com/img/artist/m/f88accb4ac5dbf6108c80151d46034d6f12383ca.jpg";
pic[31]="http://cdn.helloproject.com/img/artist/m/81ac77e2a25fc37bc4e65c0130914cce94853ec6.jpg";
pic[32]="http://cdn.helloproject.com/img/artist/m/61f335a12355313bd08291a7900ac20101d46ec5.jpg";
pic[33]="http://cdn.helloproject.com/img/artist/m/ca1b8246a5288d79bf3c8858d27e545d0d0ba426.jpg";
pic[34]="http://cdn.helloproject.com/img/artist/m/40369729adbf051d01d59f604a1ab1ac836d71b7.jpg";
point[ 1 ]= 1 ;
point[ 2 ]= 1 ;
point[ 3 ]= 1 ;
point[ 4 ]= 2 ;
point[ 5 ]= 1 ;
point[ 6 ]= 0 ;
point[ 7 ]= 0 ;
point[ 8 ]= 2 ;
point[ 9 ]= 1 ;
point[ 10 ]= 1 ;
point[ 11 ]= 0 ;
point[ 12 ]= 0 ;
point[ 13 ]= 2 ;
point[ 14 ]= 0 ;
point[ 15 ]= 3 ;
point[ 16 ]= 0 ;
point[ 17 ]= 2 ;
point[ 18 ]= 2 ;
point[ 19 ]= 0 ;
point[ 20 ]= 0 ;
point[ 21 ]= 2 ;
point[ 22 ]= 0 ;
point[ 23 ]= 1 ;
point[ 24 ]= 2 ;
point[ 25 ]= 1 ;
point[ 26 ]= 0 ;
point[ 27 ]= 2 ;
point[ 28 ]= 0 ;
point[ 29 ]= 3 ;
point[ 30 ]= 0 ;
point[ 31 ]= 2 ;
point[ 32 ]= 0 ;
point[ 33 ]= 4 ;
point[ 34 ]= 0 ;
var timer;
var delay = 300;
delta=0;
n1=34*Math.random();
m1=Math.floor(n1)+1;
x=m1;
n1=34*Math.random();
m1=Math.floor(n1)+1;
y=m1;
n1=34*Math.random();
m1=Math.floor(n1)+1;
z=m1;
$("#but").click(function () {
delta=1;
n1=34*Math.random();
m1=Math.floor(n1)+1;
x=m1;
n1=34*Math.random();
m1=Math.floor(n1)+1;
y=m1;
n1=34*Math.random();
m1=Math.floor(n1)+1;
mes="ストップを押して";
});
$("#but2").click(function () {
delta=0;
c1=point[x];
c2=point[y];
c3=point[z];
mes="残念";
h=0;
if(c1>0)h=h+1;
if(c2>0)h=h+1;
if(c3>0)h=h+1;
if(h==3)mes="おめでとう";
});
var loop = function () {
x=x+delta;
y=y+delta;
z=z+delta;
if(x>34)x=1;
if(y>34)y=1;
if(z>34)z=1;
paint();
clearTimeout(timer);
timer = setTimeout(loop, delay);
}
loop();
}
function paint(){
var sub=new svgpaint();
str="<svg width=\"1000\" height=\"500\">";
str=str+sub.rect(0,0,500,500,"blue");
str=str+sub.rect(500,0,500,500,"red");
str=str+"</svg>";
$("#memo").html(str);
}
function imx(im,x1,y1,w1,h1){
var str;
str="<image xlink:href=";
str=str+chop(im);
str=str+"x="+chop(x1)+" ";
str=str+"y="+chop(y1)+" ";
str=str+"width="+chop(w1)+" ";
str=str+"height="+chop(h1);
str=str+"/>"
return str;
}
function chop(str){
var strx;
strx="\""+str+"\"";
return strx;
}
<!DOCTYPE html>
<html>
<head>
<title>狼スロット</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="material.min.css">
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css">
<script src="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="jquery.js"></script>
<script src="sample.js"></script>
<script src="svgpaint.js"></script>
</head>
<body onload="sample()">
</body>
<div id="memo"></div>
<button class="mdl-button mdl-js-button mdl-button--raised" id="but">
スタート
</button>
<button class="mdl-button mdl-js-button mdl-button--raised" id="but2">
ストップ
</button>
</body>
</html>
最終更新:2016年10月05日 11:25