shuffle_list.TXT
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function shuffle(x){
if(x.name === "kia"){
for(j = 0; j < kia_hitter_shuffle.length; j++){
if(kia_hitter_shuffle.length == 0){
continue;
}
else if(x.value == kia_hitter_shuffle[j][0]){
console.log(x.value == kia_hitter_shuffle[j][0])
return 0;
}
}
for(i = 0; i < kia_hitter.length; i++){
if(x.value == kia_hitter[i][0]){
kia_hitter_shuffle.push(kia_hitter[i]);
}
}
}
console.log(kia_hitter_shuffle);
////////////////////////////////////////////////////////////////
if(x.name === "dusan"){
for(j = 0; j < dusan_hitter_shuffle.length; j++){
if(dusan_hitter_shuffle.length == 0){
continue;
}
else if(x.value == dusan_hitter_shuffle[j][0]){
console.log(x.value == dusan_hitter_shuffle[j][0])
return 0;
}
}
for(i = 0; i < dusan_hitter.length; i++){
if(x.value == dusan_hitter[i][0]){
dusan_hitter_shuffle.push(dusan_hitter[i]);
}
}
}
//나머지 팀들 똑같이 추가
}
function remove(x){
if(document.getElementById(x.name).name == 'kia'){
for(i = 0; i < kia_hitter_shuffle.length; i++){
if(kia_hitter_shuffle.length == 0){
return 0;
}
else if(document.getElementById(x.name).value == kia_hitter_shuffle[i][0]){
kia_hitter_shuffle.splice(i,1);
}
}
}
console.log(kia_hitter_shuffle);
//나머지 팀들 똑같이 추가
}