Showing
9 changed files
with
0 additions
and
1154 deletions
JS_test.css
deleted
100644 → 0
JS_test.html
deleted
100644 → 0
1 | -<!DOCTYPE html> | ||
2 | -<html lang="ko"> | ||
3 | -<head> | ||
4 | - <meta charset="UTF-8"> | ||
5 | - <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
6 | - <title>일정</title> | ||
7 | - <link rel="stylesheet" type="text/css"href="calander.css"> | ||
8 | - <script src = "kia.js"></script> | ||
9 | - <script src = "dusan.js"></script> | ||
10 | - <script src = "algorithm.js"></script> | ||
11 | - <script src = "shuffle_list.js"></script> | ||
12 | -</head> | ||
13 | -<body> | ||
14 | - <div class = "container1"> | ||
15 | - <input type="button" onclick = algorithm() value = "start"> | ||
16 | - </div> | ||
17 | - | ||
18 | - | ||
19 | - <div class="container3"> | ||
20 | - <ul class = "image-container"> | ||
21 | - | ||
22 | - <div> | ||
23 | - <img src="player_picture/KIA/KIA_hitter_jpgs/김호령.jpg"> | ||
24 | - <input type="button" value = "김호령" id = "김호령" name = "kia" onclick = shuffle(this)> | ||
25 | - <input type="button" value = "삭제" name = "김호령" onclick = remove(this)> | ||
26 | - </div> | ||
27 | - <div> | ||
28 | - <img src="player_picture/KIA/KIA_hitter_jpgs/최형우.jpg"> | ||
29 | - <input type="button" value = "최형우" id = "최형우" name = "kia" onclick = shuffle(this)> | ||
30 | - <input type="button" value = "삭제" name = "최형우" onclick = remove(this)> | ||
31 | - </div> | ||
32 | - </ul> | ||
33 | - </div> | ||
34 | -</body> | ||
35 | -</html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
aaaa.js
deleted
100644 → 0
1 | -function aaaa(){ | ||
2 | - var pitcher = kia_pitcher[1]; //선발투수, 나중에 사용자가 지정해주는 투수로 바뀌도록 수정해야 한다. | ||
3 | - var base1 = 0; base2 = 0; base3 = 0; //1이면 주자 있고 0이면 비어있는것 | ||
4 | - var out = 0; ining = 1; //아웃카운트, 이닝 | ||
5 | - var hitter_number1 = 0; hitter_number2 = 0; //이전 타석 타자 번호 | ||
6 | - var score = 0; score2 = 0; | ||
7 | - document.getElementById('jstest').innerHTML=" "; | ||
8 | - for(i = 0; i < 10; i++){ | ||
9 | - var num = Math.random(); | ||
10 | - document.getElementById('jstest').innerHTML+=(num+" "+"<br\>"); | ||
11 | - //hitter_number1 = hitter_number(kia); hitter_number2 = hitter_number(dusan); | ||
12 | - hitter = kia_hitter[1]; //선발타자, 나중에 사용자가 지정해주는 타자로 바뀌도록 수정해야 한다. | ||
13 | - document.getElementById('jstest').innerHTML+=(hitter[0]+" "); | ||
14 | - var one = 0; var two = 0; var three = 0; var homerun = 0; | ||
15 | - | ||
16 | - if( num <= kia_pitcher[1][2]){ | ||
17 | - one = pitcher[2] * (hitter[2] - hitter[3] - hitter[4] - hitter[5])/hitter[2]; | ||
18 | - two = pitcher[2] * hitter[3]/hitter[2]; | ||
19 | - three = pitcher[2] * hitter[4]/hitter[2]; | ||
20 | - homerun = pitcher[2] * hitter[5]/hitter[2]; | ||
21 | - document.getElementById('jstest').innerHTML+=("확률" + " " + "1루타 " + one+ " "+"2루타 " + | ||
22 | - two+" "+"3루타 "+ three+ " ","홈런 " + homerun, " ");////////////////////////////// | ||
23 | - | ||
24 | - if(num <= one){ //그냥 간단하게 다음 베이스로 한 칸씩 이동하도록 계산, 모든 경우의 수 계산하는게 불가능 | ||
25 | - var num1 = Math.random(); | ||
26 | - if(num1 <= 0.5){ | ||
27 | - score = score + base3; | ||
28 | - base3 = base2; | ||
29 | - base2 = base1; | ||
30 | - base1 = 1; | ||
31 | - document.getElementById('jstest').innerHTML+=("1루타!"); | ||
32 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" ", "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
33 | - "3루 " + base3 + " ");/////////////////////////// | ||
34 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
35 | - } | ||
36 | - if(num1 > 0.5){ | ||
37 | - score = score + base3 + base2; | ||
38 | - base3 = base1; | ||
39 | - base2 = 0; | ||
40 | - base1 = 1; | ||
41 | - document.getElementById('jstest').innerHTML+=("1루타!"); | ||
42 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
43 | - "3루 " + base3 + " ");/////////////////////////// | ||
44 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
45 | - } | ||
46 | - | ||
47 | - } | ||
48 | - else if(one < num && num <= one + two){ | ||
49 | - var num2 = Math.random(); | ||
50 | - if(num2 <= 0.4){ | ||
51 | - score = score + base3 + base2; | ||
52 | - base3 = base1; | ||
53 | - base2 = 1; | ||
54 | - base1 = 0; | ||
55 | - document.getElementById('jstest').innerHTML+=("2루타!"); | ||
56 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
57 | - "3루 " + base3 + " ");/////////////////////////// | ||
58 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
59 | - } | ||
60 | - if(0.4 < num2 && num2 <=0.7){ | ||
61 | - score = score + base3 + base2 + base1; | ||
62 | - base3 = 0; | ||
63 | - base2 = 1; | ||
64 | - base1 = 0; | ||
65 | - document.getElementById('jstest').innerHTML+=("2루타!"); | ||
66 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
67 | - "3루 " + base3 + " ");/////////////////////////// | ||
68 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
69 | - } | ||
70 | - if(0.7 < num2 && num2 <= 1){ | ||
71 | - score = score + base3 + base2; | ||
72 | - base3 = 0; | ||
73 | - base2 = 1; | ||
74 | - base1 = 0; | ||
75 | - out++; | ||
76 | - document.getElementById('jstest').innerHTML+=("2루타!"); | ||
77 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
78 | - "3루 " + base3 + " ");/////////////////////////// | ||
79 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
80 | - } | ||
81 | - | ||
82 | - } | ||
83 | - else if(one + two < num && num <= one + two + three){ | ||
84 | - score = score + base3 + base2 + base1; | ||
85 | - base3 = 1; | ||
86 | - base2 = 0; | ||
87 | - base1 = 0; | ||
88 | - document.getElementById('jstest').innerHTML+=("3루타!"); | ||
89 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
90 | - "3루 " + base3 + " ");/////////////////////////// | ||
91 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
92 | - } | ||
93 | - else if(one + two + three < num && num <= one + two + three + homerun){ | ||
94 | - score = score + base3 + base2 + base1 + 1; | ||
95 | - base3 = 0; | ||
96 | - base2 = 0; | ||
97 | - base1 = 0; | ||
98 | - document.getElementById('jstest').innerHTML+=("홈런!"); | ||
99 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
100 | - "3루 " + base3 + " ");/////////////////////////// | ||
101 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
102 | - } | ||
103 | - } | ||
104 | - if( kia_pitcher[1][2] < num && num <= kia_pitcher[1][2] + kia_pitcher[1][1]*0.01){ | ||
105 | - base3 = base2; | ||
106 | - base2 = base1; | ||
107 | - base1 = 1; | ||
108 | - document.getElementById('jstest').innerHTML+=("볼넷!"); | ||
109 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
110 | - "3루 " + base3 + " ");/////////////////////////// | ||
111 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
112 | - } | ||
113 | - if( kia_pitcher[1][2] + kia_pitcher[1][1]*0.01 < num && num <= 1){ | ||
114 | - out++; | ||
115 | - if(out >= 3){ | ||
116 | - hitter = dusan_hitter[1]; | ||
117 | - pitcher = dusan_pitcher[1]; | ||
118 | - break; | ||
119 | - } | ||
120 | - document.getElementById('jstest').innerHTML+=("아웃!"); | ||
121 | - document.getElementById('jstest').innerHTML+=("베이스 상태"+" "+ "1루 " + base1 + " "+ "2루 " + base2 + " "+ | ||
122 | - "3루 " + base3 + " ");/////////////////////////// | ||
123 | - document.getElementById('jstest').innerHTML+=("score: "+score+ " "); | ||
124 | - } | ||
125 | - } | ||
126 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
algorithm.TXT
deleted
100644 → 0
1 | -function algorithm(){ | ||
2 | - var pitcher = kia_pitcher[1]; //선발투수, 나중에 사용자가 지정해주는 투수로 바뀌도록 수정해야 한다. | ||
3 | - var base1 = 0; base2 = 0; base3 = 0; //1이면 주자 있고 0이면 비어있는것 | ||
4 | - var out = 0; ining = 1; //아웃카운트, 이닝 | ||
5 | - var hitter_number1 = 0; hitter_number2 = 0; //이전 타석 타자 번호 | ||
6 | - var score = 0; score2 = 0; | ||
7 | - for(i = 0; i < 10; i++){ | ||
8 | - var num = Math.random(); | ||
9 | - document.write(num, "<br><br>");////////////////////// | ||
10 | - //hitter_number1 = hitter_number(kia); hitter_number2 = hitter_number(dusan); | ||
11 | - hitter = kia_hitter[1]; //선발타자, 나중에 사용자가 지정해주는 타자로 바뀌도록 수정해야 한다. | ||
12 | - document.write(hitter[0], "<br><br>") | ||
13 | - var one = 0; var two = 0; var three = 0; var homerun = 0; | ||
14 | - if( num <= kia_pitcher[1][2]){ | ||
15 | - one = pitcher[2] * (hitter[2] - hitter[3] - hitter[4] - hitter[5])/hitter[2]; | ||
16 | - two = pitcher[2] * hitter[3]/hitter[2]; | ||
17 | - three = pitcher[2] * hitter[4]/hitter[2]; | ||
18 | - homerun = pitcher[2] * hitter[5]/hitter[2]; | ||
19 | - document.write("확률" + "<br>" + "1루타 " + one, "<br>","2루타 " + | ||
20 | - two, "<br>","3루타 "+ three, "<br>","홈런 " + homerun, "<br><br>");////////////////////////////// | ||
21 | - | ||
22 | - if(num <= one){ //그냥 간단하게 다음 베이스로 한 칸씩 이동하도록 계산, 모든 경우의 수 계산하는게 불가능 | ||
23 | - var num1 = Math.random(); | ||
24 | - if(num1 <= 0.5){ | ||
25 | - score = score + base3; | ||
26 | - base3 = base2; | ||
27 | - base2 = base1; | ||
28 | - base1 = 1; | ||
29 | - document.write("1루타!") | ||
30 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
31 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
32 | - document.write("score: "+score+ "<br><br><br>") | ||
33 | - } | ||
34 | - if(num1 > 0.5){ | ||
35 | - score = score + base3 + base2; | ||
36 | - base3 = base1; | ||
37 | - base2 = 0; | ||
38 | - base1 = 1; | ||
39 | - document.write("1루타!") | ||
40 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
41 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
42 | - document.write("score: "+score+ "<br><br><br>") | ||
43 | - } | ||
44 | - | ||
45 | - } | ||
46 | - else if(one < num && num <= one + two){ | ||
47 | - var num2 = Math.random(); | ||
48 | - if(num2 <= 0.4){ | ||
49 | - score = score + base3 + base2; | ||
50 | - base3 = base1; | ||
51 | - base2 = 1; | ||
52 | - base1 = 0; | ||
53 | - document.write("2루타!") | ||
54 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
55 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
56 | - document.write("score: "+score+ "<br><br><br>") | ||
57 | - } | ||
58 | - if(0.4 < num2 && num2 <=0.7){ | ||
59 | - score = score + base3 + base2 + base1; | ||
60 | - base3 = 0; | ||
61 | - base2 = 1; | ||
62 | - base1 = 0; | ||
63 | - document.write("2루타!") | ||
64 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
65 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
66 | - document.write("score: "+score+ "<br><br><br>") | ||
67 | - } | ||
68 | - if(0.7 < num2 && num2 <= 1){ | ||
69 | - score = score + base3 + base2; | ||
70 | - base3 = 0; | ||
71 | - base2 = 1; | ||
72 | - base1 = 0; | ||
73 | - out++; | ||
74 | - document.write("2루타!") | ||
75 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
76 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
77 | - document.write("score: "+score+ "<br><br><br>") | ||
78 | - } | ||
79 | - | ||
80 | - } | ||
81 | - else if(one + two < num && num <= one + two + three){ | ||
82 | - score = score + base3 + base2 + base1; | ||
83 | - base3 = 1; | ||
84 | - base2 = 0; | ||
85 | - base1 = 0; | ||
86 | - document.write("3루타!") | ||
87 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
88 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
89 | - document.write("score: "+score+ "<br><br><br>") | ||
90 | - } | ||
91 | - else if(one + two + three < num && num <= one + two + three + homerun){ | ||
92 | - score = score + base3 + base2 + base1 + 1; | ||
93 | - base3 = 0; | ||
94 | - base2 = 0; | ||
95 | - base1 = 0; | ||
96 | - document.write("홈런!") | ||
97 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
98 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
99 | - document.write("score: "+score+ "<br><br><br>") | ||
100 | - } | ||
101 | - } | ||
102 | - if( kia_pitcher[1][2] < num && num <= kia_pitcher[1][2] + kia_pitcher[1][1]*0.01){ | ||
103 | - base3 = base2; | ||
104 | - base2 = base1; | ||
105 | - base1 = 1; | ||
106 | - document.write("볼넷!") | ||
107 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
108 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
109 | - document.write("score: "+score+ "<br><br><br>") | ||
110 | - } | ||
111 | - if( kia_pitcher[1][2] + kia_pitcher[1][1]*0.01 < num && num <= 1){ | ||
112 | - out++; | ||
113 | - if(out >= 3){ | ||
114 | - hitter = dusan_hitter[1]; | ||
115 | - pitcher = dusan_pitcher[1]; | ||
116 | - break; | ||
117 | - } | ||
118 | - document.write("아웃!") | ||
119 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
120 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
121 | - document.write("score: "+score+ "<br><br><br>") | ||
122 | - } | ||
123 | - } | ||
124 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
algorithm.js
deleted
100644 → 0
1 | -function algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2) => html에서 가지고와야 한다. | ||
2 | - var base1 = 0; base2 = 0; base3 = 0; //1이면 주자 있고 0이면 비어있는것 | ||
3 | - var out = 0; ining = 1; home_away = 1;//아웃카운트, 이닝, home이면 1이고 away이면 2. | ||
4 | - var hitter_number1 = 0; hitter_number2 = 0; //이전 타석 타자 번호 | ||
5 | - var score = 0; score2 = 0; | ||
6 | - while(true){ | ||
7 | - document.write(ining, '회', "<br><br>"); | ||
8 | - if(ining >= 9 && home_away == 2 && score1 != score2){ | ||
9 | - score = [] | ||
10 | - score.push(score1); score.push(score2); | ||
11 | - return score; | ||
12 | - } | ||
13 | - if(home_away == 1){ | ||
14 | - var hitter = kia_hitter[hitter_number1%9]; //hitter = hitter_list1[hitter_number1%9] | ||
15 | - var pitcher = dusan_pitcher[1]; //pitcher = pitcher1 | ||
16 | - } | ||
17 | - else if(home_away == 2){ | ||
18 | - var hitter = dusan_hitter[hitter_number2%9]; //hitter = hitter_list2[hitter_number2%9] | ||
19 | - var pitcher = kia_pitcher[1]; //pitcher = pitcher2 | ||
20 | - } | ||
21 | - var num = Math.random(); | ||
22 | - document.write(num, "<br><br>");////////////////////// | ||
23 | - //hitter_number1 = hitter_number(kia); hitter_number2 = hitter_number(dusan); | ||
24 | - document.write(hitter[0], "<br><br>") | ||
25 | - var one = 0; var two = 0; var three = 0; var homerun = 0; | ||
26 | - if( num <= kia_pitcher[1][2]){ | ||
27 | - one = pitcher[2] * (hitter[2] - hitter[3] - hitter[4] - hitter[5])/hitter[2]; | ||
28 | - two = pitcher[2] * hitter[3]/hitter[2]; | ||
29 | - three = pitcher[2] * hitter[4]/hitter[2]; | ||
30 | - homerun = pitcher[2] * hitter[5]/hitter[2]; | ||
31 | - document.write("확률" + "<br>" + "1루타 " + one, "<br>","2루타 " + | ||
32 | - two, "<br>","3루타 "+ three, "<br>","홈런 " + homerun, "<br><br>");////////////////////////////// | ||
33 | - | ||
34 | - if(num <= one){ //안타 | ||
35 | - var num1 = Math.random(); | ||
36 | - if(num1 <= 0.5){ | ||
37 | - switch(home_away){ | ||
38 | - case home_away == 1: | ||
39 | - score1 = score1 + base3; | ||
40 | - hitter_number1++; | ||
41 | - case home_away == 2: | ||
42 | - score2 = score2 + base3; | ||
43 | - hitter_number2++; | ||
44 | - } | ||
45 | - base3 = base2; | ||
46 | - base2 = base1; | ||
47 | - base1 = 1; | ||
48 | - document.write("1루타!") | ||
49 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
50 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
51 | - document.write("score: "+score+ "<br><br><br>") | ||
52 | - } | ||
53 | - if(num1 > 0.5){ | ||
54 | - switch(home_away){ | ||
55 | - case home_away == 1: | ||
56 | - score1 = score1 + base3 + base2; | ||
57 | - hitter_number1++; | ||
58 | - case home_away == 2: | ||
59 | - score2 = score2 + base3 + base2; | ||
60 | - hitter_number2++; | ||
61 | - } | ||
62 | - base3 = base1; | ||
63 | - base2 = 0; | ||
64 | - base1 = 1; | ||
65 | - document.write("1루타!") | ||
66 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
67 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
68 | - document.write("score: "+score+ "<br><br><br>") | ||
69 | - } | ||
70 | - | ||
71 | - } | ||
72 | - else if(one < num && num <= one + two){//2루타 | ||
73 | - var num2 = Math.random(); | ||
74 | - if(num2 <= 0.4){ | ||
75 | - switch(home_away){ | ||
76 | - case home_away == 1: | ||
77 | - score1 = score1 + base3 + base2; | ||
78 | - hitter_number1++; | ||
79 | - case home_away == 2: | ||
80 | - score2 = score2 + base3 + base2; | ||
81 | - hitter_number2++; | ||
82 | - } | ||
83 | - base3 = base1; | ||
84 | - base2 = 1; | ||
85 | - base1 = 0; | ||
86 | - document.write("2루타!") | ||
87 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
88 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
89 | - document.write("score: "+score+ "<br><br><br>") | ||
90 | - } | ||
91 | - if(0.4 < num2 && num2 <=0.7){ | ||
92 | - switch(home_away){ | ||
93 | - case home_away == 1: | ||
94 | - score1 = score1 + base3 + base2 + base1; | ||
95 | - hitter_number1++; | ||
96 | - case home_away == 2: | ||
97 | - score2 = score2 + base3 + base2 + base1; | ||
98 | - hitter_number2++; | ||
99 | - } | ||
100 | - base3 = 0; | ||
101 | - base2 = 1; | ||
102 | - base1 = 0; | ||
103 | - document.write("2루타!") | ||
104 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
105 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
106 | - document.write("score: "+score+ "<br><br><br>") | ||
107 | - } | ||
108 | - if(0.7 < num2 && num2 <= 1){ | ||
109 | - if(base1 == 1){ | ||
110 | - out++; | ||
111 | - } | ||
112 | - switch(home_away){ | ||
113 | - case home_away == 1: | ||
114 | - score1 = score1 + base3 + base2; | ||
115 | - hitter_number1++; | ||
116 | - case home_away == 2: | ||
117 | - score2 = score2 + base3 + base2; | ||
118 | - hitter_number2++; | ||
119 | - } | ||
120 | - score = score + base3 + base2; | ||
121 | - base3 = 0; | ||
122 | - base2 = 1; | ||
123 | - base1 = 0; | ||
124 | - | ||
125 | - document.write("2루타!") | ||
126 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
127 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
128 | - document.write("score: "+score+ "<br><br><br>") | ||
129 | - } | ||
130 | - | ||
131 | - } | ||
132 | - else if(one + two < num && num <= one + two + three){//3루타 | ||
133 | - score = score + base3 + base2 + base1; | ||
134 | - base3 = 1; | ||
135 | - base2 = 0; | ||
136 | - base1 = 0; | ||
137 | - document.write("3루타!") | ||
138 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
139 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
140 | - document.write("score: "+score+ "<br><br><br>") | ||
141 | - } | ||
142 | - else if(one + two + three < num && num <= one + two + three + homerun){//홈런 | ||
143 | - score = score + base3 + base2 + base1 + 1; | ||
144 | - base3 = 0; | ||
145 | - base2 = 0; | ||
146 | - base1 = 0; | ||
147 | - document.write("홈런!") | ||
148 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
149 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
150 | - document.write("score: "+score+ "<br><br><br>") | ||
151 | - } | ||
152 | - } | ||
153 | - if( kia_pitcher[1][2] < num && num <= kia_pitcher[1][2] + kia_pitcher[1][1]*0.01){ | ||
154 | - base3 = base2; | ||
155 | - base2 = base1; | ||
156 | - base1 = 1; | ||
157 | - document.write("볼넷!") | ||
158 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
159 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
160 | - document.write("score: "+score+ "<br><br><br>") | ||
161 | - } | ||
162 | - if( kia_pitcher[1][2] + kia_pitcher[1][1]*0.01 < num && num <= 1){ | ||
163 | - out++; | ||
164 | - if(out >= 3){ | ||
165 | - hitter = dusan_hitter[1]; | ||
166 | - pitcher = dusan_pitcher[1]; | ||
167 | - switch(home_away){ | ||
168 | - case home_away == 1: | ||
169 | - home_away++; | ||
170 | - case home_away == 2: | ||
171 | - home_away = 1; | ||
172 | - ining++; | ||
173 | - } | ||
174 | - break; | ||
175 | - } | ||
176 | - document.write("아웃!") | ||
177 | - document.write("베이스 상태"+"<br>", "1루 " + base1 + "<br>", "2루 " + base2 + "<br>", | ||
178 | - "3루 " + base3 + "<br><br>")/////////////////////////// | ||
179 | - document.write("score: "+score+ "<br><br><br>") | ||
180 | - } | ||
181 | - } | ||
182 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
dusan.js
deleted
100644 → 0
1 | -var dusan_hitter = [ | ||
2 | -['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | ||
3 | -['박건우', 0.356, 47, 9, 0, 2], | ||
4 | -['허경민', 0.345, 49, 6, 0, 3], | ||
5 | -['페르난데스', 0.336, 48, 5, 0, 6], | ||
6 | -['최용제', 0.308, 8, 2, 0, 0], | ||
7 | -['안재석', 0.304, 14, 1, 2, 0], | ||
8 | -['김인태', 0.298, 25, 3, 0, 1], | ||
9 | -['김재환', 0.285, 37, 4, 1, 9], | ||
10 | -['장승현', 0.284, 23, 1, 0, 1], | ||
11 | -['조수행', 0.278, 10, 1, 1, 0], | ||
12 | -] | ||
13 | - | ||
14 | -var dusan_pitcher = [ | ||
15 | -['선수명', '볼넷%', '피안타율'], | ||
16 | -['로켓', 7.7, 0.267], | ||
17 | -['미란다', 15.3, 0.259], | ||
18 | -['최원준', 5.7, 0.215], | ||
19 | -['홍건희', 12.5, 0.224], | ||
20 | -['김강률', 13.8, 0.217], | ||
21 | -['이승진', 7.2, 0.202], | ||
22 | -['유희관', 7.7, 0.381], | ||
23 | -['곽빈', 15.9, 0.291], | ||
24 | -['김명신', 4.1, 0.303], | ||
25 | -['조제영', 17.3, 0.286], | ||
26 | -['김민규', 8.8, 0.3], | ||
27 | -['박종기', 3.4, 0.236], | ||
28 | -['이영하', 12.8, 0.388], | ||
29 | -] | ||
30 | - | ||
31 | -var dusan_hitter_shuffle = [ | ||
32 | - ['선수명', 'AVG', 'H', '2B', '3B', 'HR'] | ||
33 | - ['박건우', 0.356, 47, 9, 0, 2], | ||
34 | - ['허경민', 0.345, 49, 6, 0, 3], | ||
35 | - ['페르난데스', 0.336, 48, 5, 0, 6], | ||
36 | - ['최용제', 0.308, 8, 2, 0, 0], | ||
37 | - ['안재석', 0.304, 14, 1, 2, 0], | ||
38 | - ['김인태', 0.298, 25, 3, 0, 1], | ||
39 | - ['김재환', 0.285, 37, 4, 1, 9], | ||
40 | - ['장승현', 0.284, 23, 1, 0, 1], | ||
41 | - ['조수행', 0.278, 10, 1, 1, 0], | ||
42 | - ['양석환', 0.277, 38, 8, 0, 5], | ||
43 | - ['박계범', 0.266, 21, 5, 0, 2], | ||
44 | - ['김재호', 0.243, 18, 1, 0, 1], | ||
45 | - ['오재원', 0.22, 11, 2, 0, 0], | ||
46 | - ['강승호', 0.212, 7, 0, 0, 2], | ||
47 | - ['권민석', 0.167, 2, 1, 0, 0], | ||
48 | - ['박세혁', 0.161, 5, 0, 0, 0], | ||
49 | - ['안권수', 0.133, 2, 0, 0, 0], | ||
50 | - ['정수빈', 0.125, 4, 1, 0, 0] | ||
51 | - ] | ||
52 | - | ||
53 | - var dusan_pitcher_shuffle = [ | ||
54 | - ['선수명', '볼넷%', '피안타율'] | ||
55 | - ['로켓', 7.7, 0.267], | ||
56 | - ['미란다', 15.3, 0.259], | ||
57 | - ['최원준', 5.7, 0.215], | ||
58 | - ['홍건희', 12.5, 0.224], | ||
59 | - ['김강률', 13.8, 0.217], | ||
60 | - ['이승진', 7.2, 0.202], | ||
61 | - ['유희관', 7.7, 0.381], | ||
62 | - ['곽빈', 15.9, 0.291], | ||
63 | - ['김명신', 4.1, 0.303], | ||
64 | - ['조제영', 17.3, 0.286], | ||
65 | - ['김민규', 8.8, 0.3], | ||
66 | - ['박종기', 3.4, 0.236], | ||
67 | - ['이영하', 12.8, 0.388], | ||
68 | - ] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
select.html
deleted
100644 → 0
File mode changed
shuffle_list.TXT
deleted
100644 → 0
1 | -function shuffle(x){ | ||
2 | - if(x.name === "kia"){ | ||
3 | - for(j = 0; j < kia_hitter_shuffle.length; j++){ | ||
4 | - if(kia_hitter_shuffle.length == 0){ | ||
5 | - continue; | ||
6 | - } | ||
7 | - else if(x.value == kia_hitter_shuffle[j][0]){ | ||
8 | - console.log(x.value == kia_hitter_shuffle[j][0]) | ||
9 | - return 0; | ||
10 | - } | ||
11 | - } | ||
12 | - for(i = 0; i < kia_hitter.length; i++){ | ||
13 | - if(x.value == kia_hitter[i][0]){ | ||
14 | - kia_hitter_shuffle.push(kia_hitter[i]); | ||
15 | - } | ||
16 | - } | ||
17 | - } | ||
18 | - console.log(kia_hitter_shuffle); | ||
19 | - //////////////////////////////////////////////////////////////// | ||
20 | - if(x.name === "dusan"){ | ||
21 | - for(j = 0; j < dusan_hitter_shuffle.length; j++){ | ||
22 | - if(dusan_hitter_shuffle.length == 0){ | ||
23 | - continue; | ||
24 | - } | ||
25 | - else if(x.value == dusan_hitter_shuffle[j][0]){ | ||
26 | - console.log(x.value == dusan_hitter_shuffle[j][0]) | ||
27 | - return 0; | ||
28 | - } | ||
29 | - } | ||
30 | - for(i = 0; i < dusan_hitter.length; i++){ | ||
31 | - if(x.value == dusan_hitter[i][0]){ | ||
32 | - dusan_hitter_shuffle.push(dusan_hitter[i]); | ||
33 | - } | ||
34 | - } | ||
35 | - } | ||
36 | - console.log(dusan_hitter_shuffle); | ||
37 | - //나머지 팀들 똑같이 추가 | ||
38 | - if(x.name === "hanhwa"){ | ||
39 | - for(j = 0; j < hanhwa_hitter_shuffle.length; j++){ | ||
40 | - if(hanhwa_hitter_shuffle.length == 0){ | ||
41 | - continue; | ||
42 | - } | ||
43 | - else if(x.value == hanhwa_hitter_shuffle[j][0]){ | ||
44 | - console.log(x.value == hanhwa_hitter_shuffle[j][0]) | ||
45 | - return 0; | ||
46 | - } | ||
47 | - } | ||
48 | - for(i = 0; i < hanhwa_hitter.length; i++){ | ||
49 | - if(x.value == hanhwa_hitter[i][0]){ | ||
50 | - hanhwa_hitter_shuffle.push(hanhwa_hitter[i]); | ||
51 | - } | ||
52 | - } | ||
53 | - } | ||
54 | - console.log(hanhwa_hitter_shuffle); | ||
55 | - | ||
56 | - if(x.name === "kiwoom"){ | ||
57 | - for(j = 0; j < kiwoom_hitter_shuffle.length; j++){ | ||
58 | - if(kiwoom_hitter_shuffle.length == 0){ | ||
59 | - continue; | ||
60 | - } | ||
61 | - else if(x.value == kiwoom_hitter_shuffle[j][0]){ | ||
62 | - console.log(x.value == kiwoom_hitter_shuffle[j][0]) | ||
63 | - return 0; | ||
64 | - } | ||
65 | - } | ||
66 | - for(i = 0; i < kiwoom_hitter.length; i++){ | ||
67 | - if(x.value == kiwoom_hitter[i][0]){ | ||
68 | - kiwoom_hitter_shuffle.push(kiwoom_hitter[i]); | ||
69 | - } | ||
70 | - } | ||
71 | - } | ||
72 | - console.log(kiwoom_hitter_shuffle); | ||
73 | - | ||
74 | - if(x.name === "kt"){ | ||
75 | - for(j = 0; j < kt_hitter_shuffle.length; j++){ | ||
76 | - if(kt_hitter_shuffle.length == 0){ | ||
77 | - continue; | ||
78 | - } | ||
79 | - else if(x.value == kt_hitter_shuffle[j][0]){ | ||
80 | - console.log(x.value == kt_hitter_shuffle[j][0]) | ||
81 | - return 0; | ||
82 | - } | ||
83 | - } | ||
84 | - for(i = 0; i < kt_hitter.length; i++){ | ||
85 | - if(x.value == kt_hitter[i][0]){ | ||
86 | - kt_hitter_shuffle.push(kt_hitter[i]); | ||
87 | - } | ||
88 | - } | ||
89 | - } | ||
90 | - console.log(kt_hitter_shuffle); | ||
91 | - | ||
92 | - if(x.name === "lg"){ | ||
93 | - for(j = 0; j < lg_hitter_shuffle.length; j++){ | ||
94 | - if(lg_hitter_shuffle.length == 0){ | ||
95 | - continue; | ||
96 | - } | ||
97 | - else if(x.value == lg_hitter_shuffle[j][0]){ | ||
98 | - console.log(x.value == lg_hitter_shuffle[j][0]) | ||
99 | - return 0; | ||
100 | - } | ||
101 | - } | ||
102 | - for(i = 0; i < lg_hitter.length; i++){ | ||
103 | - if(x.value == lg_hitter[i][0]){ | ||
104 | - lg_hitter_shuffle.push(lg_hitter[i]); | ||
105 | - } | ||
106 | - } | ||
107 | - } | ||
108 | - console.log(lg_hitter_shuffle); | ||
109 | - | ||
110 | - if(x.name === "lotte"){ | ||
111 | - for(j = 0; j < lotte_hitter_shuffle.length; j++){ | ||
112 | - if(lotte_hitter_shuffle.length == 0){ | ||
113 | - continue; | ||
114 | - } | ||
115 | - else if(x.value == lotte_hitter_shuffle[j][0]){ | ||
116 | - console.log(x.value == lotte_hitter_shuffle[j][0]) | ||
117 | - return 0; | ||
118 | - } | ||
119 | - } | ||
120 | - for(i = 0; i < lotte_hitter.length; i++){ | ||
121 | - if(x.value == lotte_hitter[i][0]){ | ||
122 | - lotte_hitter_shuffle.push(lotte_hitter[i]); | ||
123 | - } | ||
124 | - } | ||
125 | - } | ||
126 | - console.log(lotte_hitter_shuffle); | ||
127 | - | ||
128 | - if(x.name === "nc"){ | ||
129 | - for(j = 0; j < nc_hitter_shuffle.length; j++){ | ||
130 | - if(nc_hitter_shuffle.length == 0){ | ||
131 | - continue; | ||
132 | - } | ||
133 | - else if(x.value == nc_hitter_shuffle[j][0]){ | ||
134 | - console.log(x.value == nc_hitter_shuffle[j][0]) | ||
135 | - return 0; | ||
136 | - } | ||
137 | - } | ||
138 | - for(i = 0; i < nc_hitter.length; i++){ | ||
139 | - if(x.value == nc_hitter[i][0]){ | ||
140 | - nc_hitter_shuffle.push(nc_hitter[i]); | ||
141 | - } | ||
142 | - } | ||
143 | - } | ||
144 | - console.log(nc_hitter_shuffle); | ||
145 | - | ||
146 | - if(x.name === "samsung"){ | ||
147 | - for(j = 0; j < samsung_hitter_shuffle.length; j++){ | ||
148 | - if(samsung_hitter_shuffle.length == 0){ | ||
149 | - continue; | ||
150 | - } | ||
151 | - else if(x.value == samsung_hitter_shuffle[j][0]){ | ||
152 | - console.log(x.value == samsung_hitter_shuffle[j][0]) | ||
153 | - return 0; | ||
154 | - } | ||
155 | - } | ||
156 | - for(i = 0; i < samsung_hitter.length; i++){ | ||
157 | - if(x.value == samsung_hitter[i][0]){ | ||
158 | - samsung_hitter_shuffle.push(samsung_hitter[i]); | ||
159 | - } | ||
160 | - } | ||
161 | - } | ||
162 | - console.log(samsung_hitter_shuffle); | ||
163 | - | ||
164 | - if(x.name === "ssg"){ | ||
165 | - for(j = 0; j < ssg_hitter_shuffle.length; j++){ | ||
166 | - if(ssg_hitter_shuffle.length == 0){ | ||
167 | - continue; | ||
168 | - } | ||
169 | - else if(x.value == ssg_hitter_shuffle[j][0]){ | ||
170 | - console.log(x.value == ssg_hitter_shuffle[j][0]) | ||
171 | - return 0; | ||
172 | - } | ||
173 | - } | ||
174 | - for(i = 0; i < ssg_hitter.length; i++){ | ||
175 | - if(x.value == ssg_hitter[i][0]){ | ||
176 | - ssg_hitter_shuffle.push(ssg_hitter[i]); | ||
177 | - } | ||
178 | - } | ||
179 | - } | ||
180 | - console.log(ssg_hitter_shuffle); | ||
181 | -} | ||
182 | - | ||
183 | -////////////////remove | ||
184 | - | ||
185 | -function remove(x){ | ||
186 | - if(document.getElementById(x.name).name == 'kia'){ | ||
187 | - for(i = 0; i < kia_hitter_shuffle.length; i++){ | ||
188 | - if(kia_hitter_shuffle.length == 0){ | ||
189 | - return 0; | ||
190 | - } | ||
191 | - else if(document.getElementById(x.name).value == kia_hitter_shuffle[i][0]){ | ||
192 | - kia_hitter_shuffle.splice(i,1); | ||
193 | - } | ||
194 | - } | ||
195 | - } | ||
196 | - console.log(kia_hitter_shuffle); | ||
197 | - //나머지 팀들 똑같이 추가 | ||
198 | - | ||
199 | - if(document.getElementById(x.name).name == 'dusan'){ | ||
200 | - for(i = 0; i < dusan_hitter_shuffle.length; i++){ | ||
201 | - if(dusan_hitter_shuffle.length == 0){ | ||
202 | - return 0; | ||
203 | - } | ||
204 | - else if(document.getElementById(x.name).value == dusan_hitter_shuffle[i][0]){ | ||
205 | - dusan_hitter_shuffle.splice(i,1); | ||
206 | - } | ||
207 | - } | ||
208 | - } | ||
209 | - console.log(dusan_hitter_shuffle); | ||
210 | - | ||
211 | - if(document.getElementById(x.name).name == 'hanhwa'){ | ||
212 | - for(i = 0; i < hanhwa_hitter_shuffle.length; i++){ | ||
213 | - if(hanhwa_hitter_shuffle.length == 0){ | ||
214 | - return 0; | ||
215 | - } | ||
216 | - else if(document.getElementById(x.name).value == hanhwa_hitter_shuffle[i][0]){ | ||
217 | - hanhwa_hitter_shuffle.splice(i,1); | ||
218 | - } | ||
219 | - } | ||
220 | - } | ||
221 | - console.log(hanhwa_hitter_shuffle); | ||
222 | - | ||
223 | - if(document.getElementById(x.name).name == 'kiwoom'){ | ||
224 | - for(i = 0; i < kiwoom_hitter_shuffle.length; i++){ | ||
225 | - if(kiwoom_hitter_shuffle.length == 0){ | ||
226 | - return 0; | ||
227 | - } | ||
228 | - else if(document.getElementById(x.name).value == kiwoom_hitter_shuffle[i][0]){ | ||
229 | - kiwoom_hitter_shuffle.splice(i,1); | ||
230 | - } | ||
231 | - } | ||
232 | - } | ||
233 | - console.log(kiwoom_hitter_shuffle); | ||
234 | - | ||
235 | - if(document.getElementById(x.name).name == 'kt'){ | ||
236 | - for(i = 0; i < kt_hitter_shuffle.length; i++){ | ||
237 | - if(kt_hitter_shuffle.length == 0){ | ||
238 | - return 0; | ||
239 | - } | ||
240 | - else if(document.getElementById(x.name).value == kt_hitter_shuffle[i][0]){ | ||
241 | - kt_hitter_shuffle.splice(i,1); | ||
242 | - } | ||
243 | - } | ||
244 | - } | ||
245 | - console.log(kt_hitter_shuffle); | ||
246 | - | ||
247 | - if(document.getElementById(x.name).name == 'lg'){ | ||
248 | - for(i = 0; i < lg_hitter_shuffle.length; i++){ | ||
249 | - if(lg_hitter_shuffle.length == 0){ | ||
250 | - return 0; | ||
251 | - } | ||
252 | - else if(document.getElementById(x.name).value == lg_hitter_shuffle[i][0]){ | ||
253 | - lg_hitter_shuffle.splice(i,1); | ||
254 | - } | ||
255 | - } | ||
256 | - } | ||
257 | - console.log(lg_hitter_shuffle); | ||
258 | - | ||
259 | - if(document.getElementById(x.name).name == 'lotte'){ | ||
260 | - for(i = 0; i < lotte_hitter_shuffle.length; i++){ | ||
261 | - if(lotte_hitter_shuffle.length == 0){ | ||
262 | - return 0; | ||
263 | - } | ||
264 | - else if(document.getElementById(x.name).value == lotte_hitter_shuffle[i][0]){ | ||
265 | - lotte_hitter_shuffle.splice(i,1); | ||
266 | - } | ||
267 | - } | ||
268 | - } | ||
269 | - console.log(lotte_hitter_shuffle); | ||
270 | - | ||
271 | - if(document.getElementById(x.name).name == 'nc'){ | ||
272 | - for(i = 0; i < nc_hitter_shuffle.length; i++){ | ||
273 | - if(nc_hitter_shuffle.length == 0){ | ||
274 | - return 0; | ||
275 | - } | ||
276 | - else if(document.getElementById(x.name).value == nc_hitter_shuffle[i][0]){ | ||
277 | - nc_hitter_shuffle.splice(i,1); | ||
278 | - } | ||
279 | - } | ||
280 | - } | ||
281 | - console.log(nc_hitter_shuffle); | ||
282 | - | ||
283 | - if(document.getElementById(x.name).name == 'samsung'){ | ||
284 | - for(i = 0; i < samsung_hitter_shuffle.length; i++){ | ||
285 | - if(samsung_hitter_shuffle.length == 0){ | ||
286 | - return 0; | ||
287 | - } | ||
288 | - else if(document.getElementById(x.name).value == samsung_hitter_shuffle[i][0]){ | ||
289 | - samsung_hitter_shuffle.splice(i,1); | ||
290 | - } | ||
291 | - } | ||
292 | - } | ||
293 | - console.log(samsung_hitter_shuffle); | ||
294 | - | ||
295 | - if(document.getElementById(x.name).name == 'ssg'){ | ||
296 | - for(i = 0; i < ssg_hitter_shuffle.length; i++){ | ||
297 | - if(ssg_hitter_shuffle.length == 0){ | ||
298 | - return 0; | ||
299 | - } | ||
300 | - else if(document.getElementById(x.name).value == ssg_hitter_shuffle[i][0]){ | ||
301 | - ssg_hitter_shuffle.splice(i,1); | ||
302 | - } | ||
303 | - } | ||
304 | - } | ||
305 | - console.log(ssg_hitter_shuffle); | ||
306 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
shuffle_list.js
deleted
100644 → 0
1 | -function shuffle(x){ | ||
2 | - if(x.name === "kia"){ | ||
3 | - for(j = 0; j < kia_hitter_shuffle.length; j++){ | ||
4 | - if(kia_hitter_shuffle.length == 0){ | ||
5 | - continue; | ||
6 | - } | ||
7 | - else if(x.value == kia_hitter_shuffle[j][0]){ | ||
8 | - console.log(x.value == kia_hitter_shuffle[j][0]) | ||
9 | - return 0; | ||
10 | - } | ||
11 | - } | ||
12 | - for(i = 0; i < kia_hitter.length; i++){ | ||
13 | - if(x.value == kia_hitter[i][0]){ | ||
14 | - kia_hitter_shuffle.push(kia_hitter[i]); | ||
15 | - } | ||
16 | - } | ||
17 | - } | ||
18 | - console.log(kia_hitter_shuffle); | ||
19 | - //////////////////////////////////////////////////////////////// | ||
20 | - if(x.name === "dusan"){ | ||
21 | - for(j = 0; j < dusan_hitter_shuffle.length; j++){ | ||
22 | - if(dusan_hitter_shuffle.length == 0){ | ||
23 | - continue; | ||
24 | - } | ||
25 | - else if(x.value == dusan_hitter_shuffle[j][0]){ | ||
26 | - console.log(x.value == dusan_hitter_shuffle[j][0]) | ||
27 | - return 0; | ||
28 | - } | ||
29 | - } | ||
30 | - for(i = 0; i < dusan_hitter.length; i++){ | ||
31 | - if(x.value == dusan_hitter[i][0]){ | ||
32 | - dusan_hitter_shuffle.push(dusan_hitter[i]); | ||
33 | - } | ||
34 | - } | ||
35 | - } | ||
36 | - console.log(dusan_hitter_shuffle); | ||
37 | - //나머지 팀들 똑같이 추가 | ||
38 | - if(x.name === "hanhwa"){ | ||
39 | - for(j = 0; j < hanhwa_hitter_shuffle.length; j++){ | ||
40 | - if(hanhwa_hitter_shuffle.length == 0){ | ||
41 | - continue; | ||
42 | - } | ||
43 | - else if(x.value == hanhwa_hitter_shuffle[j][0]){ | ||
44 | - console.log(x.value == hanhwa_hitter_shuffle[j][0]) | ||
45 | - return 0; | ||
46 | - } | ||
47 | - } | ||
48 | - for(i = 0; i < hanhwa_hitter.length; i++){ | ||
49 | - if(x.value == hanhwa_hitter[i][0]){ | ||
50 | - hanhwa_hitter_shuffle.push(hanhwa_hitter[i]); | ||
51 | - } | ||
52 | - } | ||
53 | - } | ||
54 | - console.log(hanhwa_hitter_shuffle); | ||
55 | - | ||
56 | - if(x.name === "kiwoom"){ | ||
57 | - for(j = 0; j < kiwoom_hitter_shuffle.length; j++){ | ||
58 | - if(kiwoom_hitter_shuffle.length == 0){ | ||
59 | - continue; | ||
60 | - } | ||
61 | - else if(x.value == kiwoom_hitter_shuffle[j][0]){ | ||
62 | - console.log(x.value == kiwoom_hitter_shuffle[j][0]) | ||
63 | - return 0; | ||
64 | - } | ||
65 | - } | ||
66 | - for(i = 0; i < kiwoom_hitter.length; i++){ | ||
67 | - if(x.value == kiwoom_hitter[i][0]){ | ||
68 | - kiwoom_hitter_shuffle.push(kiwoom_hitter[i]); | ||
69 | - } | ||
70 | - } | ||
71 | - } | ||
72 | - console.log(kiwoom_hitter_shuffle); | ||
73 | - | ||
74 | - if(x.name === "kt"){ | ||
75 | - for(j = 0; j < kt_hitter_shuffle.length; j++){ | ||
76 | - if(kt_hitter_shuffle.length == 0){ | ||
77 | - continue; | ||
78 | - } | ||
79 | - else if(x.value == kt_hitter_shuffle[j][0]){ | ||
80 | - console.log(x.value == kt_hitter_shuffle[j][0]) | ||
81 | - return 0; | ||
82 | - } | ||
83 | - } | ||
84 | - for(i = 0; i < kt_hitter.length; i++){ | ||
85 | - if(x.value == kt_hitter[i][0]){ | ||
86 | - kt_hitter_shuffle.push(kt_hitter[i]); | ||
87 | - } | ||
88 | - } | ||
89 | - } | ||
90 | - console.log(kt_hitter_shuffle); | ||
91 | - | ||
92 | - if(x.name === "lg"){ | ||
93 | - for(j = 0; j < lg_hitter_shuffle.length; j++){ | ||
94 | - if(lg_hitter_shuffle.length == 0){ | ||
95 | - continue; | ||
96 | - } | ||
97 | - else if(x.value == lg_hitter_shuffle[j][0]){ | ||
98 | - console.log(x.value == lg_hitter_shuffle[j][0]) | ||
99 | - return 0; | ||
100 | - } | ||
101 | - } | ||
102 | - for(i = 0; i < lg_hitter.length; i++){ | ||
103 | - if(x.value == lg_hitter[i][0]){ | ||
104 | - lg_hitter_shuffle.push(lg_hitter[i]); | ||
105 | - } | ||
106 | - } | ||
107 | - } | ||
108 | - console.log(lg_hitter_shuffle); | ||
109 | - | ||
110 | - if(x.name === "lotte"){ | ||
111 | - for(j = 0; j < lotte_hitter_shuffle.length; j++){ | ||
112 | - if(lotte_hitter_shuffle.length == 0){ | ||
113 | - continue; | ||
114 | - } | ||
115 | - else if(x.value == lotte_hitter_shuffle[j][0]){ | ||
116 | - console.log(x.value == lotte_hitter_shuffle[j][0]) | ||
117 | - return 0; | ||
118 | - } | ||
119 | - } | ||
120 | - for(i = 0; i < lotte_hitter.length; i++){ | ||
121 | - if(x.value == lotte_hitter[i][0]){ | ||
122 | - lotte_hitter_shuffle.push(lotte_hitter[i]); | ||
123 | - } | ||
124 | - } | ||
125 | - } | ||
126 | - console.log(lotte_hitter_shuffle); | ||
127 | - | ||
128 | - if(x.name === "nc"){ | ||
129 | - for(j = 0; j < nc_hitter_shuffle.length; j++){ | ||
130 | - if(nc_hitter_shuffle.length == 0){ | ||
131 | - continue; | ||
132 | - } | ||
133 | - else if(x.value == nc_hitter_shuffle[j][0]){ | ||
134 | - console.log(x.value == nc_hitter_shuffle[j][0]) | ||
135 | - return 0; | ||
136 | - } | ||
137 | - } | ||
138 | - for(i = 0; i < nc_hitter.length; i++){ | ||
139 | - if(x.value == nc_hitter[i][0]){ | ||
140 | - nc_hitter_shuffle.push(nc_hitter[i]); | ||
141 | - } | ||
142 | - } | ||
143 | - } | ||
144 | - console.log(nc_hitter_shuffle); | ||
145 | - | ||
146 | - if(x.name === "samsung"){ | ||
147 | - for(j = 0; j < samsung_hitter_shuffle.length; j++){ | ||
148 | - if(samsung_hitter_shuffle.length == 0){ | ||
149 | - continue; | ||
150 | - } | ||
151 | - else if(x.value == samsung_hitter_shuffle[j][0]){ | ||
152 | - console.log(x.value == samsung_hitter_shuffle[j][0]) | ||
153 | - return 0; | ||
154 | - } | ||
155 | - } | ||
156 | - for(i = 0; i < samsung_hitter.length; i++){ | ||
157 | - if(x.value == samsung_hitter[i][0]){ | ||
158 | - samsung_hitter_shuffle.push(samsung_hitter[i]); | ||
159 | - } | ||
160 | - } | ||
161 | - } | ||
162 | - console.log(samsung_hitter_shuffle); | ||
163 | - | ||
164 | - if(x.name === "ssg"){ | ||
165 | - for(j = 0; j < ssg_hitter_shuffle.length; j++){ | ||
166 | - if(ssg_hitter_shuffle.length == 0){ | ||
167 | - continue; | ||
168 | - } | ||
169 | - else if(x.value == ssg_hitter_shuffle[j][0]){ | ||
170 | - console.log(x.value == ssg_hitter_shuffle[j][0]) | ||
171 | - return 0; | ||
172 | - } | ||
173 | - } | ||
174 | - for(i = 0; i < ssg_hitter.length; i++){ | ||
175 | - if(x.value == ssg_hitter[i][0]){ | ||
176 | - ssg_hitter_shuffle.push(ssg_hitter[i]); | ||
177 | - } | ||
178 | - } | ||
179 | - } | ||
180 | - console.log(ssg_hitter_shuffle); | ||
181 | -} | ||
182 | - | ||
183 | -////////////////remove | ||
184 | - | ||
185 | -function remove(x){ | ||
186 | - if(document.getElementById(x.name).name == 'kia'){ | ||
187 | - for(i = 0; i < kia_hitter_shuffle.length; i++){ | ||
188 | - if(kia_hitter_shuffle.length == 0){ | ||
189 | - return 0; | ||
190 | - } | ||
191 | - else if(document.getElementById(x.name).value == kia_hitter_shuffle[i][0]){ | ||
192 | - kia_hitter_shuffle.splice(i,1); | ||
193 | - } | ||
194 | - } | ||
195 | - } | ||
196 | - console.log(kia_hitter_shuffle); | ||
197 | - //나머지 팀들 똑같이 추가 | ||
198 | - | ||
199 | - if(document.getElementById(x.name).name == 'dusan'){ | ||
200 | - for(i = 0; i < dusan_hitter_shuffle.length; i++){ | ||
201 | - if(dusan_hitter_shuffle.length == 0){ | ||
202 | - return 0; | ||
203 | - } | ||
204 | - else if(document.getElementById(x.name).value == dusan_hitter_shuffle[i][0]){ | ||
205 | - dusan_hitter_shuffle.splice(i,1); | ||
206 | - } | ||
207 | - } | ||
208 | - } | ||
209 | - console.log(dusan_hitter_shuffle); | ||
210 | - | ||
211 | - if(document.getElementById(x.name).name == 'hanhwa'){ | ||
212 | - for(i = 0; i < hanhwa_hitter_shuffle.length; i++){ | ||
213 | - if(hanhwa_hitter_shuffle.length == 0){ | ||
214 | - return 0; | ||
215 | - } | ||
216 | - else if(document.getElementById(x.name).value == hanhwa_hitter_shuffle[i][0]){ | ||
217 | - hanhwa_hitter_shuffle.splice(i,1); | ||
218 | - } | ||
219 | - } | ||
220 | - } | ||
221 | - console.log(hanhwa_hitter_shuffle); | ||
222 | - | ||
223 | - if(document.getElementById(x.name).name == 'kiwoom'){ | ||
224 | - for(i = 0; i < kiwoom_hitter_shuffle.length; i++){ | ||
225 | - if(kiwoom_hitter_shuffle.length == 0){ | ||
226 | - return 0; | ||
227 | - } | ||
228 | - else if(document.getElementById(x.name).value == kiwoom_hitter_shuffle[i][0]){ | ||
229 | - kiwoom_hitter_shuffle.splice(i,1); | ||
230 | - } | ||
231 | - } | ||
232 | - } | ||
233 | - console.log(kiwoom_hitter_shuffle); | ||
234 | - | ||
235 | - if(document.getElementById(x.name).name == 'kt'){ | ||
236 | - for(i = 0; i < kt_hitter_shuffle.length; i++){ | ||
237 | - if(kt_hitter_shuffle.length == 0){ | ||
238 | - return 0; | ||
239 | - } | ||
240 | - else if(document.getElementById(x.name).value == kt_hitter_shuffle[i][0]){ | ||
241 | - kt_hitter_shuffle.splice(i,1); | ||
242 | - } | ||
243 | - } | ||
244 | - } | ||
245 | - console.log(kt_hitter_shuffle); | ||
246 | - | ||
247 | - if(document.getElementById(x.name).name == 'lg'){ | ||
248 | - for(i = 0; i < lg_hitter_shuffle.length; i++){ | ||
249 | - if(lg_hitter_shuffle.length == 0){ | ||
250 | - return 0; | ||
251 | - } | ||
252 | - else if(document.getElementById(x.name).value == lg_hitter_shuffle[i][0]){ | ||
253 | - lg_hitter_shuffle.splice(i,1); | ||
254 | - } | ||
255 | - } | ||
256 | - } | ||
257 | - console.log(lg_hitter_shuffle); | ||
258 | - | ||
259 | - if(document.getElementById(x.name).name == 'lotte'){ | ||
260 | - for(i = 0; i < lotte_hitter_shuffle.length; i++){ | ||
261 | - if(lotte_hitter_shuffle.length == 0){ | ||
262 | - return 0; | ||
263 | - } | ||
264 | - else if(document.getElementById(x.name).value == lotte_hitter_shuffle[i][0]){ | ||
265 | - lotte_hitter_shuffle.splice(i,1); | ||
266 | - } | ||
267 | - } | ||
268 | - } | ||
269 | - console.log(lotte_hitter_shuffle); | ||
270 | - | ||
271 | - if(document.getElementById(x.name).name == 'nc'){ | ||
272 | - for(i = 0; i < nc_hitter_shuffle.length; i++){ | ||
273 | - if(nc_hitter_shuffle.length == 0){ | ||
274 | - return 0; | ||
275 | - } | ||
276 | - else if(document.getElementById(x.name).value == nc_hitter_shuffle[i][0]){ | ||
277 | - nc_hitter_shuffle.splice(i,1); | ||
278 | - } | ||
279 | - } | ||
280 | - } | ||
281 | - console.log(nc_hitter_shuffle); | ||
282 | - | ||
283 | - if(document.getElementById(x.name).name == 'samsung'){ | ||
284 | - for(i = 0; i < samsung_hitter_shuffle.length; i++){ | ||
285 | - if(samsung_hitter_shuffle.length == 0){ | ||
286 | - return 0; | ||
287 | - } | ||
288 | - else if(document.getElementById(x.name).value == samsung_hitter_shuffle[i][0]){ | ||
289 | - samsung_hitter_shuffle.splice(i,1); | ||
290 | - } | ||
291 | - } | ||
292 | - } | ||
293 | - console.log(samsung_hitter_shuffle); | ||
294 | - | ||
295 | - if(document.getElementById(x.name).name == 'ssg'){ | ||
296 | - for(i = 0; i < ssg_hitter_shuffle.length; i++){ | ||
297 | - if(ssg_hitter_shuffle.length == 0){ | ||
298 | - return 0; | ||
299 | - } | ||
300 | - else if(document.getElementById(x.name).value == ssg_hitter_shuffle[i][0]){ | ||
301 | - ssg_hitter_shuffle.splice(i,1); | ||
302 | - } | ||
303 | - } | ||
304 | - } | ||
305 | - console.log(ssg_hitter_shuffle); | ||
306 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment