Showing
7 changed files
with
553 additions
and
184 deletions
... | @@ -25,10 +25,10 @@ | ... | @@ -25,10 +25,10 @@ |
25 | </ul> | 25 | </ul> |
26 | </nav> | 26 | </nav> |
27 | <div class="container2"> | 27 | <div class="container2"> |
28 | - <a href="https://sports.news.naver.com/kbaseball/record/index.nhn?category=kbo&year=2021"><img src="pngs/rank.jpg" style="display:block; margin:0 auto; width:600px; height:400px;"></a> | 28 | + <a href="https://sports.news.naver.com/kbaseball/record/index.nhn?category=kbo&year=2021"><img src="pngs/rank.JPG" style="display:block; margin:0 auto; width:600px; height:400px;"></a> |
29 | </div> | 29 | </div> |
30 | <div class="container3"> | 30 | <div class="container3"> |
31 | - <a href="https://sports.news.naver.com/kbaseball/schedule/index.nhn"><img src="pngs/today.jpg" style="display:block; margin:0 auto; width:655px; height:150px;"></a> | 31 | + <a href="https://sports.news.naver.com/kbaseball/schedule/index.nhn"><img src="pngs/today.JPG" style="display:block; margin:0 auto; width:655px; height:150px;"></a> |
32 | </div> | 32 | </div> |
33 | <div class="container4"> | 33 | <div class="container4"> |
34 | <img src="pngs/1.jpg" style="display:block; margin:0 auto; width:200px; height:100px;"> | 34 | <img src="pngs/1.jpg" style="display:block; margin:0 auto; width:200px; height:100px;"> | ... | ... |
1 | var dusan_hitter = [ | 1 | var dusan_hitter = [ |
2 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 2 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
3 | - ['박건우', 0.356, 47, 9, 0, 2], | 3 | + ['김재환',0.268,48,4,1,13], |
4 | - ['허경민', 0.345, 49, 6, 0, 3], | 4 | + ['박건우',0.340,52,10,0,2], |
5 | - ['페르난데스', 0.336, 48, 5, 0, 6], | 5 | + ['페르난데스',0.333,66,7,0,8], |
6 | - ['최용제', 0.308, 8, 2, 0, 0], | 6 | + ['허경민',0.330,63,9,0,4], |
7 | - ['안재석', 0.304, 14, 1, 2, 0], | 7 | + ['양석환',0.269,52,10,0,12], |
8 | - ['김인태', 0.298, 25, 3, 0, 1], | 8 | + ['김인태',0.267,36,5,1,4], |
9 | - ['김재환', 0.285, 37, 4, 1, 9], | 9 | + ['안재석',0.316,25,4,2,0], |
10 | - ['장승현', 0.284, 23, 1, 0, 1], | 10 | + ['최용제',0.311,14,3,0,0], |
11 | - ['조수행', 0.278, 10, 1, 1, 0], | 11 | + ['조수행',0.277,13,1,1,0], |
12 | - ['양석환', 0.277, 38, 8, 0, 5], | 12 | + ['장승현',0.248,27,3,0,2], |
13 | - ['박계범', 0.266, 21, 5, 0, 2], | 13 | + ['김재호',0.262,28,5,0,1], |
14 | - ['김재호', 0.243, 18, 1, 0, 1], | 14 | + ['박계범',0.266,21,5,0,2], |
15 | - ['오재원', 0.22, 11, 2, 0, 0], | 15 | + ['강승호',0.247,19,2,1,2], |
16 | - ['강승호', 0.212, 7, 0, 0, 2], | 16 | + ['정수빈',0.226,14,2,1,0], |
17 | - ['권민석', 0.167, 2, 1, 0, 0], | 17 | + ['박세혁',0.182,6,0,0,0], |
18 | - ['박세혁', 0.161, 5, 0, 0, 0], | 18 | + ['오재원',0.175,11,2,0,0], |
19 | - ['안권수', 0.133, 2, 0, 0, 0], | ||
20 | - ['정수빈', 0.125, 4, 1, 0, 0] | ||
21 | ] | 19 | ] |
22 | 20 | ||
23 | var dusan_pitcher = [ | 21 | var dusan_pitcher = [ |
... | @@ -29,57 +27,67 @@ var dusan_pitcher = [ | ... | @@ -29,57 +27,67 @@ var dusan_pitcher = [ |
29 | ['곽빈', 16.7, 0.256], | 27 | ['곽빈', 16.7, 0.256], |
30 | ['유희관', 7.6, 0.409], | 28 | ['유희관', 7.6, 0.409], |
31 | ['조제영', 16.7, 0.367], | 29 | ['조제영', 16.7, 0.367], |
32 | - ['이영하', 12.8, 0.388], | 30 | + ['이영하', 16.0, 0.393], |
33 | ] | 31 | ] |
34 | 32 | ||
35 | var hanhwa_hitter = [ | 33 | var hanhwa_hitter = [ |
36 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 34 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
37 | - ['하주석', 0.299, 40, 7, 1, 3], | 35 | + ['정은원',0.284,54,10,4,1], |
38 | - ['장운호', 0.291, 30, 6, 0, 0], | 36 | + ['노시환',0.266,49,8,0,11], |
39 | - ['노시환', 0.279, 38, 7, 0, 7], | 37 | + ['하주석',0.283,53,10,1,4], |
40 | - ['정은원', 0.277, 36, 7, 2, 0], | 38 | + ['조한민',0.308,8,1,2,2], |
41 | - ['힐리', 0.258, 32, 6, 1, 2], | 39 | + ['최재훈',0.216,27,3,0,2], |
42 | - ['정진호', 0.254, 15, 3, 0, 0], | 40 | + ['김민하',0.240,18,4,0,1], |
43 | - ['최재훈', 0.247, 20, 1, 0, 2], | 41 | + ['장운호',0.273,35,8,0,0], |
44 | - ['김민하', 0.246, 14, 4, 0, 1], | 42 | + ['노수광',0.217,15,1,0,1], |
45 | - ['노수광', 0.238, 10, 1, 0, 0], | 43 | + ['강상원',0.167,3,0,0,0], |
46 | - ['이해창', 0.231, 9, 3, 0, 0], | 44 | + ['강경학',0.136,3,0,0,0], |
47 | - ['이성열', 0.207, 12, 3, 0, 1], | 45 | + ['이해창',0.231,9,3,0,0], |
48 | - ['박정현', 0.196, 19, 3, 0, 0], | 46 | + ['허관회',0.161,5,0,0,0], |
49 | - ['유장혁', 0.169, 14, 5, 0, 1], | 47 | + ['이성열',0.203,16,4,0,1], |
50 | - ['임종찬', 0.163, 16, 5, 0, 1], | 48 | + ['힐리',0.258,46,8,1,4], |
49 | + ['정진호',0.216,16,3,0,0], | ||
50 | + ['박정현',0.196,21,4,0,0], | ||
51 | + ['유장혁',0.143,14,5,0,1], | ||
52 | + ['임종찬',0.155,16,5,0,1], | ||
51 | ] | 53 | ] |
52 | 54 | ||
53 | var hanhwa_pitcher = [ | 55 | var hanhwa_pitcher = [ |
54 | ['선수명', '볼넷%', '피안타율'], | 56 | ['선수명', '볼넷%', '피안타율'], |
55 | ['킹험', 6.4, 0.211], | 57 | ['킹험', 6.4, 0.211], |
56 | - ['카펜터', 11.6, 0.201], | 58 | + ['카펜터', 11.7, 0.209], |
57 | - ['김민우', 10.9, 0.217], | 59 | + ['김민우', 11.2, 0.208], |
58 | - ['강재민', 9.9, 0.143], | 60 | + ['김범수', 13.9, 0.284], |
59 | - ['김범수', 14.3, 0.265], | 61 | + ['장시환', 15.8, 0.306], |
60 | - ['장시환', 14.9, 0.311], | 62 | + ['윤대경', 15.0, 0.208], |
61 | - ['정우람', 13.8, 0.244], | 63 | + ['김기중', 5.6, 0.353], |
62 | - ['윤대경', 15.3, 0.222], | ||
63 | ['김이환', 16.7, 0.283], | 64 | ['김이환', 16.7, 0.283], |
64 | - ['윤호솔', 10.8, 0.222], | 65 | + ['박주홍', 50.0, 0.250], |
65 | - ['배동현', 12.5, 0.244], | 66 | + ['이승관', 39.1, 0.538], |
67 | + ['배동현', 15.4, 0.252], | ||
66 | ] | 68 | ] |
67 | 69 | ||
68 | var kia_hitter = [ | 70 | var kia_hitter = [ |
69 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 71 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
70 | - ['김태진', 0.349, 22, 2, 1, 0], | 72 | + ['최원준',0.324,71,5,5,1], |
71 | - ['최원준', 0.342, 54, 2, 4, 0], | 73 | + ['김민식',0.247,22,3,0,2], |
72 | - ['이정훈', 0.293, 12, 2, 0, 1], | 74 | + ['김선빈',0.281,52,10,0,0], |
73 | - ['김선빈', 0.292, 40, 8, 0, 0], | 75 | + ['이정훈',0.298,25,5,0,2], |
74 | - ['터커', 0.265, 40, 9, 1, 2], | 76 | + ['김태진',0.336,41,3,1,0], |
75 | - ['김민식', 0.261, 18, 2, 0, 2], | 77 | + ['터커',0.269,56,11,1,3], |
76 | - ['류지혁', 0.259, 21, 3, 0, 0], | 78 | + ['이진영',0.188,6,2,0,2], |
77 | - ['한승택', 0.259, 15, 3, 0, 0], | 79 | + ['한승택',0.238,19,3,0,0], |
78 | - ['이창진', 0.254, 18, 5, 0, 0], | 80 | + ['김호령',0.163,7,2,0,1], |
79 | - ['박찬호', 0.237, 28, 5, 2, 0], | 81 | + ['류지혁',0.259,21,3,0,0], |
80 | - ['최형우', 0.2, 18, 0, 0, 4], | 82 | + ['김규성',0.133,2,1,0,0], |
81 | - ['나지완', 0.184, 9, 1, 0, 0], | 83 | + ['이창진',0.218,22,5,0,0], |
82 | - ['김호령', 0.163, 7, 2, 0, 1], | 84 | + ['나지완',0.184,9,1,0,0], |
85 | + ['박찬호',0.241,42,6,2,0], | ||
86 | + ['이우성',0.194,6,1,0,0], | ||
87 | + ['유민상',0.143,3,1,0,0], | ||
88 | + ['최형우',0.195,22,1,0,5], | ||
89 | + ['황대인',0.259,15,2,0,2], | ||
90 | + ['나주환',0.172,5,0,0,0], | ||
83 | ] | 91 | ] |
84 | 92 | ||
85 | var kia_pitcher = [ | 93 | var kia_pitcher = [ |
... | @@ -92,29 +100,32 @@ var kia_pitcher = [ | ... | @@ -92,29 +100,32 @@ var kia_pitcher = [ |
92 | ['이민우', 7.9, 0.346], | 100 | ['이민우', 7.9, 0.346], |
93 | ['남재현', 27.8, 0.208], | 101 | ['남재현', 27.8, 0.208], |
94 | ['김유신', 16.2, 0.269], | 102 | ['김유신', 16.2, 0.269], |
103 | + ['차명진', 8.0, 0.273], | ||
95 | ] | 104 | ] |
96 | 105 | ||
97 | var kiwoom_hitter = [ | 106 | var kiwoom_hitter = [ |
98 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 107 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
99 | - ['이정후', 0.367, 55, 14, 3, 1], | 108 | + ['이정후',0.346,71,21,4,1], |
100 | - ['서건창', 0.31, 40, 8, 0, 1], | 109 | + ['박동원',0.281,34,7,0,9], |
101 | - ['이지영', 0.304, 17, 2, 1, 0], | 110 | + ['김혜성',0.283,62,8,1,3], |
102 | - ['박동원', 0.281, 25, 5, 0, 7], | 111 | + ['서건창',0.266,49,9,0,1], |
103 | - ['김혜성', 0.268, 41, 7, 1, 3], | 112 | + ['김웅빈',0.250,39,10,0,4], |
104 | - ['이용규', 0.258, 32, 2, 4, 0], | 113 | + ['이용규',0.256,42,4,4,0], |
105 | - ['김웅빈', 0.256, 32, 8, 0, 3], | 114 | + ['송우현',0.280,46,11,1,1], |
106 | - ['프레이타스',0.25, 25, 7, 0, 1], | 115 | + ['박병호',0.219,35,8,0,8], |
107 | - ['송우현', 0.248, 28, 5, 1, 1], | 116 | + ['전병우',0.196,22,6,0,3], |
108 | - ['전병우', 0.222, 14, 3, 0, 2], | 117 | + ['박준태',0.048,1,1,0,0], |
109 | - ['김수환', 0.22, 9, 2, 0, 2], | 118 | + ['프레이타스',0.285,35,10,0,2], |
110 | - ['박병호', 0.212, 22, 5, 0, 5], | 119 | + ['김수환',0.220,9,2,0,2], |
111 | - ['허정협', 0.179, 5, 0, 0, 0], | 120 | + ['허정협',0.179,5,0,0,0], |
112 | - ['신준우', 0.167, 1, 1, 0, 0], | 121 | + ['박주홍',0.143,4,2,0,0], |
122 | + ['이지영',0.253,22,2,1,0], | ||
123 | + ['변상권',0.105,2,0,0,0], | ||
113 | ] | 124 | ] |
114 | 125 | ||
115 | var kiwoom_pitcher = [ | 126 | var kiwoom_pitcher = [ |
116 | ['선수명', '볼넷%', '피안타율'], | 127 | ['선수명', '볼넷%', '피안타율'], |
117 | - ['요키시', 6.6, 0.27], | 128 | + ['요키시', 6.8, 0.252], |
118 | ['한현희', 8.8, 0.261], | 129 | ['한현희', 8.8, 0.261], |
119 | ['최원태', 7.7, 0.276], | 130 | ['최원태', 7.7, 0.276], |
120 | ['안우진', 10.4, 0.269], | 131 | ['안우진', 10.4, 0.269], |
... | @@ -127,27 +138,29 @@ var kiwoom_pitcher = [ | ... | @@ -127,27 +138,29 @@ var kiwoom_pitcher = [ |
127 | 138 | ||
128 | var kt_hitter = [ | 139 | var kt_hitter = [ |
129 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 140 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
130 | - ['강백호', 0.417, 60, 8, 1, 5], | 141 | + ['강백호',0.407,81,12,1,7], |
131 | - ['김병희', 0.389, 7, 2, 0, 2], | 142 | + ['배정대',0.295,57,13,0,3], |
132 | - ['배정대', 0.324, 44, 8, 0, 2], | 143 | + ['심우준',0.306,49,11,1,3], |
133 | - ['황재균', 0.324, 22, 2, 1, 1], | 144 | + ['김병희',0.300,12,3,0,3], |
134 | - ['심우준', 0.315, 34, 6, 1, 2], | 145 | + ['황재균',0.316,31,3,1,1], |
135 | - ['김민혁', 0.306, 19, 0, 2, 0], | 146 | + ['조용호',0.281,47,7,0,0], |
136 | - ['유한준', 0.288, 19, 5, 0, 0], | 147 | + ['장성우',0.234,36,6,0,6], |
137 | - ['알몬테', 0.284, 40, 5, 0, 4], | 148 | + ['알몬테',0.296,58,9,0,5], |
138 | - ['조용호', 0.277, 33, 3, 0, 0], | 149 | + ['김민혁',0.302,19,0,2,0], |
139 | - ['문상철', 0.258, 16, 6, 0, 2], | 150 | + ['유한준',0.280,30,6,0,1], |
140 | - ['장성우', 0.235, 24, 3, 0, 3], | 151 | + ['권동진',0.182,6,3,0,0], |
141 | - ['신본기', 0.222, 18, 4, 0, 0], | 152 | + ['송민섭',0.080,2,0,0,0], |
142 | - ['박경수', 0.203, 15, 5, 0, 4], | 153 | + ['문상철',0.222,16,6,0,2], |
143 | - ['이홍구', 0.184, 7, 0, 0, 1], | 154 | + ['신본기',0.400,18,4,0,0], |
155 | + ['박경수',0.185,22,6,0,5], | ||
156 | + ['이홍구',0.178,8,0,0,1], | ||
144 | ] | 157 | ] |
145 | 158 | ||
146 | var kt_pitcher = [ | 159 | var kt_pitcher = [ |
147 | ['선수명', '볼넷%', '피안타율'], | 160 | ['선수명', '볼넷%', '피안타율'], |
148 | ['데스파이네', 11.3, 0.213], | 161 | ['데스파이네', 11.3, 0.213], |
149 | ['고영표', 3.9, 0.243], | 162 | ['고영표', 3.9, 0.243], |
150 | - ['배제성', 14.0, 0,224], | 163 | + ['배제성', 13.8, 0.226], |
151 | ['소형준', 12.3, 0.269], | 164 | ['소형준', 12.3, 0.269], |
152 | ['김민수', 11.8, 0.299], | 165 | ['김민수', 11.8, 0.299], |
153 | ['쿠에바스', 12.0, 0.306], | 166 | ['쿠에바스', 12.0, 0.306], |
... | @@ -156,17 +169,21 @@ var kt_pitcher = [ | ... | @@ -156,17 +169,21 @@ var kt_pitcher = [ |
156 | 169 | ||
157 | var lg_hitter = [ | 170 | var lg_hitter = [ |
158 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 171 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
159 | - ['김현수', 0.316, 42, 7, 0, 6], | 172 | + ['홍창기', 0.316, 60, 8, 1, 3], |
160 | - ['홍창기', 0.313, 46, 8, 1, 2], | 173 | + ['김현수', 0.317, 59, 9, 0, 8], |
161 | - ['채은성', 0.271, 29, 6, 0, 5], | 174 | + ['채은성', 0.303, 47, 11, 0, 7], |
162 | - ['문보경', 0.267, 12, 4, 0, 1], | 175 | + ['문보경', 0.275, 19, 7, 0, 2], |
163 | - ['정주현', 0.266, 25, 6, 1, 2], | 176 | + ['유강남', 0.241, 40, 6, 0, 5], |
164 | - ['라모스', 0.248, 34, 5, 0, 5], | 177 | + ['오지환', 0.231, 37, 9, 1, 2], |
165 | - ['유강남', 0.241, 27, 4, 0, 3], | 178 | + ['이형종', 0.222, 22, 6, 0, 4], |
166 | - ['오지환', 0.22, 28, 5, 0, 2], | 179 | + ['한석현', 0.286, 6, 2, 1, 0], |
167 | - ['이형종', 0.209, 14, 5, 0, 3], | 180 | + ['라모스', 0.243, 45, 7, 1, 8], |
168 | - ['이천웅', 0.202, 17, 5, 0, 1], | 181 | + ['김재성', 0.188, 6, 1, 1, 1], |
169 | - ['김민성', 0.192, 23, 8, 0, 2], | 182 | + ['신민재', 0.167, 3, 0, 0, 0], |
183 | + ['정주현', 0.222, 30, 6, 1, 2], | ||
184 | + ['구본혁', 0.150, 3, 2, 0, 0], | ||
185 | + ['김민성', 0.207, 34, 9, 0, 3], | ||
186 | + ['이천웅', 0.211, 27, 6, 0, 2], | ||
170 | ] | 187 | ] |
171 | 188 | ||
172 | var lg_pitcher = [ | 189 | var lg_pitcher = [ |
... | @@ -175,32 +192,40 @@ var lg_pitcher = [ | ... | @@ -175,32 +192,40 @@ var lg_pitcher = [ |
175 | ['정찬헌', 5.6, 0.271], | 192 | ['정찬헌', 5.6, 0.271], |
176 | ['켈리', 9.6, 0.228], | 193 | ['켈리', 9.6, 0.228], |
177 | ['이민호', 11.5, 0.234], | 194 | ['이민호', 11.5, 0.234], |
195 | + ['이우찬', 10.2, 0.264] | ||
178 | ['배재준', 6.2, 0.356], | 196 | ['배재준', 6.2, 0.356], |
179 | ['차우찬', 9.5, 0.211], | 197 | ['차우찬', 9.5, 0.211], |
180 | ['함덕주', 17.2, 0.224], | 198 | ['함덕주', 17.2, 0.224], |
181 | - ['김윤식', 17.2, 0.254], | 199 | + ['김윤식', 12.7, 0.254], |
182 | ['임찬규', 25.8, 0.476], | 200 | ['임찬규', 25.8, 0.476], |
183 | - ['이상영', 12.0, 0.258], | 201 | + ['이상영', 11.1, 0.257], |
184 | ] | 202 | ] |
185 | 203 | ||
186 | var lotte_hitter = [ | 204 | var lotte_hitter = [ |
187 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 205 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
206 | + ['전준우', 0.325, 65, 12, 0, 2], | ||
207 | + ['정훈', 0.305, 57, 13, 0, 6], | ||
208 | + ['마차도', 0.272, 43, 9, 0, 4], | ||
209 | + ['안치홍', 0.310, 54, 11, 2, 3], | ||
188 | ['이대호', 0.328, 44, 3, 0, 8], | 210 | ['이대호', 0.328, 44, 3, 0, 8], |
189 | - ['전준우', 0.316, 43, 8, 0, 2], | 211 | + ['한동희', 0.241, 41, 8, 0, 7], |
190 | - ['안치홍', 0.299, 43, 8, 1, 3], | 212 | + ['추재현', 0.318, 28, 6, 0, 3], |
191 | - ['정훈', 0.296, 37, 11, 0, 4], | 213 | + ['김준태', 0.221, 23, 5, 0, 4], |
192 | - ['마차도', 0.28, 28, 6, 0, 3], | 214 | + ['김재유', 0.290, 9, 2, 0, 0], |
193 | - ['추재현', 0.278, 10, 2, 0, 0], | 215 | + ['배성근', 0.270, 10, 1, 0, 0], |
194 | - ['손아섭', 0.255, 40, 3, 0, 0], | ||
195 | - ['김준태', 0.25, 21, 5, 0, 3], | ||
196 | - ['오윤석', 0.25, 10, 5, 0, 1], | ||
197 | - ['한동희', 0.248, 30, 6, 0, 5], | ||
198 | ['이병규', 0.235, 8, 0, 0, 0], | 216 | ['이병규', 0.235, 8, 0, 0, 0], |
217 | + ['지시완', 0.237, 14, 2, 0, 2], | ||
218 | + ['오윤석', 0.245, 13, 7, 0, 1], | ||
219 | + ['장두성', 0.214, 6, 2, 0, 0], | ||
220 | + ['나승엽', 0.268, 11, 1, 0, 0], | ||
221 | + ['김민수', 0.232, 16, 5, 0, 1], | ||
222 | + ['강태율', 0.100, 2, 1, 0, 1], | ||
223 | + ['손아섭', 0.271, 57, 6, 0, 0], | ||
199 | ] | 224 | ] |
200 | 225 | ||
201 | var lotte_pitcher = [ | 226 | var lotte_pitcher = [ |
202 | ['선수명', '볼넷%', '피안타율'], | 227 | ['선수명', '볼넷%', '피안타율'], |
203 | - ['스트레일리', 8.7, 0.268], | 228 | + ['스트레일리', 9.3, 0.268], |
204 | ['박세웅', 8.3, 0.230], | 229 | ['박세웅', 8.3, 0.230], |
205 | ['나균안', 9.4, 0.274], | 230 | ['나균안', 9.4, 0.274], |
206 | ['프랑코', 11.0, 0.234], | 231 | ['프랑코', 11.0, 0.234], |
... | @@ -212,20 +237,25 @@ var lotte_pitcher = [ | ... | @@ -212,20 +237,25 @@ var lotte_pitcher = [ |
212 | 237 | ||
213 | var nc_hitter = [ | 238 | var nc_hitter = [ |
214 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 239 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
215 | - ['양의지', 0.361, 44, 10, 1, 9], | 240 | + ['양의지', 0.349, 60, 11, 1, 11], |
216 | - ['알테어', 0.326, 44, 8, 0, 13], | 241 | + ['알테어', 0.303, 56, 10, 0, 14], |
217 | - ['박석민', 0.325, 25, 4, 0, 8], | 242 | + ['박석민', 0.299, 35, 8, 0, 10], |
218 | - ['박민우', 0.303, 27, 1, 1, 1], | 243 | + ['나성범', 0.280, 60, 12, 1, 13,] |
219 | - ['김태군', 0.278, 20, 5, 0, 2], | 244 | + ['노진혁', 0.296, 45, 5, 0, 5], |
220 | - ['나성범', 0.269, 42, 8, 1, 10], | 245 | + ['이명기', 0.296, 47, 10, 0, 2], |
221 | - ['이명기', 0.266, 29, 6, 0, 1], | 246 | + ['박민우', 0.287, 41, 5, 1, 1], |
222 | - ['노진혁', 0.265, 30, 3, 0, 4], | 247 | + ['권희동', 0.237, 22, 3, 0, 6], |
223 | - ['박준영', 0.26, 19, 2, 1, 4], | 248 | + ['김태군', 0.248, 26, 5, 0, 3], |
224 | - ['강진성', 0.239, 16, 5, 0, 1], | 249 | + ['윤형준', 0.400, 10, 0, 0, 3], |
225 | - ['권희동', 0.233, 20, 3, 0, 5], | 250 | + ['박준영', 0.238, 24, 2, 1, 5], |
226 | - ['이원재', 0.196, 10, 2, 0, 0], | 251 | + ['김찬형', 0.364, 8, 1, 0, 0], |
227 | - ['지석훈', 0.156, 5, 1, 0, 0], | 252 | + ['정진기', 0.333, 7, 3, 0, 0], |
253 | + ['전민수', 0.318, 7, 0, 0, 0], | ||
254 | + ['강진성', 0.234, 26, 7, 0, 1], | ||
255 | + ['지석훈', 0.147, 5, 1, 0, 0], | ||
256 | + ['최정원', 0.158, 3, 0, 0, 0], | ||
228 | ['도태훈', 0.067, 2, 0, 0, 0], | 257 | ['도태훈', 0.067, 2, 0, 0, 0], |
258 | + ['이원재', 0.226, 14, 2, 0, 0], | ||
229 | ] | 259 | ] |
230 | 260 | ||
231 | var nc_pitcher = [ | 261 | var nc_pitcher = [ |
... | @@ -236,26 +266,27 @@ var nc_pitcher = [ | ... | @@ -236,26 +266,27 @@ var nc_pitcher = [ |
236 | ['신민혁', 7.8, 0.245], | 266 | ['신민혁', 7.8, 0.245], |
237 | ['강동연', 9.0, 0.271], | 267 | ['강동연', 9.0, 0.271], |
238 | ['김진호', 42.9, 0.500], | 268 | ['김진호', 42.9, 0.500], |
239 | - ['김영규', 11.5, 0.309], | 269 | + ['김영규', 11.9, 0.312], |
240 | ['이재학', 24.4, 0.290], | 270 | ['이재학', 24.4, 0.290], |
241 | ] | 271 | ] |
242 | 272 | ||
243 | var samsung_hitter = [ | 273 | var samsung_hitter = [ |
244 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 274 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
245 | - ['김민수', 0.4, 12, 4, 0, 2], | 275 | + ['피렐라',0.347,77,10,1,13], |
246 | - ['피렐라', 0.358, 57, 7, 1, 12], | 276 | + ['강민호',0.351,54,8,0,6], |
247 | - ['강민호', 0.35, 41, 7, 0, 5], | 277 | + ['박해민',0.292,52,8,0,3], |
248 | - ['박해민', 0.312, 43, 7, 0, 1], | 278 | + ['구자욱',0.287,58,10,4,6], |
249 | - ['구자욱', 0.299, 43, 9, 3, 5], | 279 | + ['오재일',0.295,36,8,0,8], |
250 | - ['오재일', 0.257, 18, 4, 0, 3], | 280 | + ['김헌곤',0.310,31,2,0,3], |
251 | - ['김지찬', 0.25, 17, 3, 0, 0], | 281 | + ['김민수',0.313,15,4,0,2], |
252 | - ['강한울', 0.247, 21, 2, 0, 0], | 282 | + ['이원석',0.241,33,8,0,3], |
253 | - ['송준석', 0.24, 12, 2, 0, 2], | 283 | + ['김지찬',0.259,30,5,0,1], |
254 | - ['이학주', 0.22, 18, 6, 0, 2], | 284 | + ['이학주',0.220,18,6,0,2], |
255 | - ['김헌곤', 0.208, 11, 1, 0, 2], | 285 | + ['김호재',0.222,8,1,0,0], |
256 | - ['이원석', 0.204, 20, 3, 0, 3], | 286 | + ['송준석',0.235,12,2,0,2], |
257 | - ['김상수', 0.191, 25, 2, 1, 0], | 287 | + ['강한울',0.231,24,3,0,0], |
258 | - ['김동엽', 0.125, 4, 0, 0, 0], | 288 | + ['김상수',0.206,37,4,1,0], |
289 | + ['김동엽',0.157,8,1,0,0], | ||
259 | ] | 290 | ] |
260 | 291 | ||
261 | var samsung_pitcher = [ | 292 | var samsung_pitcher = [ |
... | @@ -264,27 +295,32 @@ var samsung_pitcher = [ | ... | @@ -264,27 +295,32 @@ var samsung_pitcher = [ |
264 | ['원태인', 8.6, 0.246], | 295 | ['원태인', 8.6, 0.246], |
265 | ['라이블리', 9.3, 0.190], | 296 | ['라이블리', 9.3, 0.190], |
266 | ['백정현', 10.5, 0.250], | 297 | ['백정현', 10.5, 0.250], |
267 | - ['최채흥', 14.5, 0.346], | 298 | + ['최채흥', 9.7, 0.346], |
268 | ['이승민', 10.2, 0.294], | 299 | ['이승민', 10.2, 0.294], |
269 | ['김윤수', 19.3, 0.348], | 300 | ['김윤수', 19.3, 0.348], |
301 | + ['김대우', 8.3, 0.275], | ||
270 | ['구준범', 25.0, 0.250], | 302 | ['구준범', 25.0, 0.250], |
271 | ] | 303 | ] |
272 | 304 | ||
273 | var ssg_hitter = [ | 305 | var ssg_hitter = [ |
274 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], | 306 | ['선수명', 'AVG', 'H', '2B', '3B', 'HR'], |
275 | - ['최주환', 0.365, 27, 6, 0, 4], | 307 | + ['최정',0.293,49,8,0,13], |
276 | - ['최정', 0.309, 38, 6, 0, 10], | 308 | + ['추신수',0.263,44,4,1,8], |
277 | - ['이흥련', 0.295, 13, 0, 0, 0], | 309 | + ['로맥',0.253,46,6,0,13], |
278 | - ['박성한', 0.287, 25, 6, 0, 1], | 310 | + ['박성한',0.297,38,8,0,1], |
279 | - ['김성현', 0.286, 22, 3, 0, 1], | 311 | + ['최주환',0.304,35,7,0,4], |
280 | - ['이재원', 0.277, 26, 7, 0, 2], | 312 | + ['최지훈',0.237,32,4,1,3], |
281 | - ['로맥', 0.254, 33, 4, 0, 9], | 313 | + ['김성현',0.278,27,4,0,2], |
282 | - ['한유섬', 0.252, 32, 7, 0, 4], | 314 | + ['한유섬',0.250,41,9,0,6], |
283 | - ['김강민', 0.243, 17, 4, 0, 1], | 315 | + ['이흥련',0.281,16,1,0,0], |
284 | - ['정의윤', 0.241, 14, 0, 0, 4], | 316 | + ['이재원',0.258,34,9,0,2], |
285 | - ['추신수', 0.228, 29, 1, 0, 8], | 317 | + ['정현',0.190,4,2,0,0], |
286 | - ['최지훈', 0.195, 15, 2, 1, 1], | 318 | + ['김강민',0.242,22,5,1,3], |
287 | - ['오태곤', 0.193, 11, 2, 0, 2], | 319 | + ['김찬형',0.174,4,1,0,0], |
320 | + ['오태곤',0.232,19,2,0,4], | ||
321 | + ['오준혁',0.207,6,1,0,1], | ||
322 | + ['정의윤',0.224,22,0,0,5], | ||
323 | + ['고종욱',0.250,13,0,0,0], | ||
288 | ] | 324 | ] |
289 | 325 | ||
290 | var ssg_pitcher = [ | 326 | var ssg_pitcher = [ |
... | @@ -298,5 +334,5 @@ var ssg_pitcher = [ | ... | @@ -298,5 +334,5 @@ var ssg_pitcher = [ |
298 | ['양선률', 30.0, 0.500], | 334 | ['양선률', 30.0, 0.500], |
299 | ['정수민', 17.3, 0.284], | 335 | ['정수민', 17.3, 0.284], |
300 | ['김정빈', 19.4, 0.304], | 336 | ['김정빈', 19.4, 0.304], |
301 | - ['이건욱', 28.1, 0.317], | 337 | + ['이건욱', 26.4, 0.333], |
302 | ] | 338 | ] |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
predict.js
0 → 100644
1 | +function add_predict(){ | ||
2 | + var s=""; | ||
3 | + s+=("<option value="+10+">"+10+"</option>"); | ||
4 | + s+=("<option value="+20+">"+20+"</option>"); | ||
5 | + s+=("<option value="+50+">"+50+"</option>"); | ||
6 | + s+=("<option value="+70+">"+70+"</option>"); | ||
7 | + s+=("<option value="+100+">"+100+"</option>"); | ||
8 | + s+=("<option value="+500+">"+500+"</option>"); | ||
9 | + s+=("<option value="+1000+">"+1000+"</option>"); | ||
10 | + s+=("<option value="+5000+">"+5000+"</option>"); | ||
11 | + s+=("<option value="+10000+">"+10000+"</option>"); | ||
12 | + s+=("<option value="+50000+">"+50000+"</option>"); | ||
13 | + s+=("<option value="+100000+">"+100000+"</option>"); | ||
14 | + document.getElementById('pr').innerHTML=s; | ||
15 | +} | ||
16 | + | ||
17 | +function predict(value, hitter_list1, hitter_list2, pitcher1, pitcher2){ | ||
18 | + var score=[0,0]; | ||
19 | + var w=0; | ||
20 | + var h=0; | ||
21 | + var d=0; | ||
22 | + for(var i=0; i<value; i++){ | ||
23 | + score=algorithms(hitter_list1, hitter_list2, pitcher1, pitcher2); | ||
24 | + if(score[0]>score[1]){ | ||
25 | + w++; | ||
26 | + }else if(score[0]<score[1]){ | ||
27 | + h++; | ||
28 | + }else{ | ||
29 | + d++; | ||
30 | + } | ||
31 | + } | ||
32 | + document.getElementById('jstest').innerHTML="예측 결과"+"<br\>"+"TEST "+value+"번"+"<br\><br\>"+"원정팀 승리 횟수 : "+w+"<br\>" | ||
33 | + +"홈팀 승리 횟수 : "+h+"<br\>"+"무승부 횟수 : "+d+"<br\><br\>"+"원정팀 승리 확률 : "+w*100/value+"%"+"<br\>"+"홈팀 승리 확률 : "+h*100/value+"%"+"<br\>"; | ||
34 | +} | ||
35 | + | ||
36 | +function algorithms(hitter_list1, hitter_list2, pitcher1, pitcher2){ | ||
37 | + var base1 = 0; var base2 = 0; var base3 = 0; //1이면 주자 있고 0이면 비어있는것 | ||
38 | + var out = 0; var ining = 1; var home_away = 1;//아웃카운트, 이닝, home이면 1이고 away이면 2. | ||
39 | + var score1 = 0; var score2 = 0; | ||
40 | + var hitter_num1 = 1; var hitter_num2 = 1; | ||
41 | + var hit=false; | ||
42 | + while(true){ | ||
43 | + if(ining == 9 && home_away == 2 && score1 < score2){//9회 초 후 home팀이 이기고 있을 때! | ||
44 | + break; | ||
45 | + } | ||
46 | + else if(ining==10 && home_away==1 && score1>score2 && hit==false){//9회 말 후 home팀이 이기고 있을 때! | ||
47 | + break; | ||
48 | + } | ||
49 | + else if(ining>9 && score1 < score2){//9회 말 후 home팀이 이기고 있을 때! | ||
50 | + break; | ||
51 | + } | ||
52 | + else if(ining>=11 && home_away==1 && hit==false && score1>score2){//연장 이후 원정팀이 이기고 있을 때! | ||
53 | + break; | ||
54 | + } | ||
55 | + else if(ining>=10 && home_away==2 && hit==true && score1<score2){//끝내기 | ||
56 | + break; | ||
57 | + } | ||
58 | + else if(ining==13 && score1==score2){//무승부 | ||
59 | + break; | ||
60 | + } | ||
61 | + | ||
62 | + if(home_away == 1){ | ||
63 | + var hitter = hitter_list1[hitter_num1]; //hitter = hitter_list1[hitter_number1%9] | ||
64 | + var pitcher = pitcher2; //pitcher = pitcher1 | ||
65 | + | ||
66 | + } | ||
67 | + else if(home_away == 2){ | ||
68 | + var hitter = hitter_list2[hitter_num2]; //hitter = hitter_list2[hitter_number2%9] | ||
69 | + var pitcher = pitcher1; //pitcher = pitcher2 | ||
70 | + | ||
71 | + } | ||
72 | + | ||
73 | + var num = Math.random(); | ||
74 | + //hitter_number1 = hitter_number(kia); hitter_number2 = hitter_number(dusan); | ||
75 | + var one = 0; var two = 0; var three = 0; var homerun = 0; | ||
76 | + one = pitcher[2] * (hitter[2] - hitter[3] - hitter[4] - hitter[5])/hitter[2]; | ||
77 | + two = pitcher[2] * hitter[3]/hitter[2]; | ||
78 | + three = pitcher[2] * hitter[4]/hitter[2]; | ||
79 | + homerun = pitcher[2] * hitter[5]/hitter[2]; | ||
80 | + hit=true; | ||
81 | + if(num <= one){ //안타 | ||
82 | + var num1 = Math.random(); | ||
83 | + if(num1 <= 0.5){ | ||
84 | + switch(home_away){ | ||
85 | + case 1: | ||
86 | + score1 = score1 + base3; | ||
87 | + break; | ||
88 | + case 2: | ||
89 | + score2 = score2 + base3; | ||
90 | + break; | ||
91 | + } | ||
92 | + base3 = base2; | ||
93 | + base2 = base1; | ||
94 | + base1 = 1; | ||
95 | + | ||
96 | + } | ||
97 | + else{ | ||
98 | + switch(home_away){ | ||
99 | + case 1: | ||
100 | + score1 = score1 + base3 + base2; | ||
101 | + break; | ||
102 | + case 2: | ||
103 | + score2 = score2 + base3 + base2; | ||
104 | + break; | ||
105 | + } | ||
106 | + base3 = base1; | ||
107 | + base2 = 0; | ||
108 | + base1 = 1; | ||
109 | + | ||
110 | + } | ||
111 | + | ||
112 | + } | ||
113 | + else if((one < num) && (num <= one + two)){//2루타 | ||
114 | + var num2 = Math.random(); | ||
115 | + if(num2 <= 0.4){ | ||
116 | + switch(home_away){ | ||
117 | + case 1: | ||
118 | + score1 = score1 + base3 + base2; | ||
119 | + break; | ||
120 | + case 2: | ||
121 | + score2 = score2 + base3 + base2; | ||
122 | + break; | ||
123 | + } | ||
124 | + base3 = base1; | ||
125 | + base2 = 1; | ||
126 | + base1 = 0; | ||
127 | + | ||
128 | + } | ||
129 | + else if(0.4 < num2 && num2 <=0.7){ | ||
130 | + switch(home_away){ | ||
131 | + case 1: | ||
132 | + score1 = score1 + base3 + base2 + base1; | ||
133 | + break; | ||
134 | + case 2: | ||
135 | + score2 = score2 + base3 + base2 + base1; | ||
136 | + break; | ||
137 | + } | ||
138 | + base3 = 0; | ||
139 | + base2 = 1; | ||
140 | + base1 = 0; | ||
141 | + | ||
142 | + } | ||
143 | + else{ | ||
144 | + switch(home_away){ | ||
145 | + case 1: | ||
146 | + score1 = score1 + base3 + base2; | ||
147 | + break; | ||
148 | + case 2: | ||
149 | + score2 = score2 + base3 + base2; | ||
150 | + break; | ||
151 | + } | ||
152 | + base3 = 0; | ||
153 | + base2 = 1; | ||
154 | + base1 = 0; | ||
155 | + | ||
156 | + } | ||
157 | + | ||
158 | + } | ||
159 | + else if((one + two < num) && (num <= one + two + three)){//3루타 | ||
160 | + switch(home_away){ | ||
161 | + case 1: | ||
162 | + score1 = score1 + base3 + base2 + base1; | ||
163 | + break; | ||
164 | + case 2: | ||
165 | + score2 = score2 + base3 + base2 + base1; | ||
166 | + break; | ||
167 | + } | ||
168 | + base3 = 1; | ||
169 | + base2 = 0; | ||
170 | + base1 = 0; | ||
171 | + | ||
172 | + } | ||
173 | + else if(one + two + three < num && num <= one + two + three + homerun){//홈런 | ||
174 | + switch(home_away){ | ||
175 | + case 1: | ||
176 | + score1 = score1 + base3 + base2 + base1 + 1; | ||
177 | + break; | ||
178 | + case 2: | ||
179 | + score2 = score2 + base3 + base2 + base1 + 1; | ||
180 | + break; | ||
181 | + } | ||
182 | + base3 = 0; | ||
183 | + base2 = 0; | ||
184 | + base1 = 0; | ||
185 | + | ||
186 | + } | ||
187 | + | ||
188 | + | ||
189 | + else if( pitcher[2] < num && (num <= pitcher[2] +pitcher[1]*0.01)){//볼넷 | ||
190 | + if(base1==1 && base2==1 && base3==1){//만루 밀어내기 득점 -> 스코어 ++ | ||
191 | + if(home_away==1){ | ||
192 | + score1++; | ||
193 | + } | ||
194 | + else{ | ||
195 | + score2++; | ||
196 | + } | ||
197 | + } | ||
198 | + else{//스코어 추가되지 않는 경우 | ||
199 | + if((base2==1 && base1==0 )||(base3==1 && base1==0)||(base2==1&&base3==1&&base1==0)){//2루만 채워져있거나 3루만 채워져있거나 2,3루만 채워져있거나 | ||
200 | + base1=1; | ||
201 | + } | ||
202 | + else if(base1==1 && base3==1 && base2==0){//1루 3루 채워져있고 2루 비워져있거나 | ||
203 | + base2=base1; | ||
204 | + base1=1; | ||
205 | + } | ||
206 | + else{ | ||
207 | + base3 = base2; | ||
208 | + base2 = base1; | ||
209 | + base1 = 1; | ||
210 | + } | ||
211 | + } | ||
212 | + | ||
213 | + } | ||
214 | + | ||
215 | + else{//아웃 | ||
216 | + out++; | ||
217 | + | ||
218 | + } | ||
219 | + | ||
220 | + if(out >= 3){ | ||
221 | + switch(home_away){ | ||
222 | + case 1: | ||
223 | + home_away = 2; | ||
224 | + hit=false; | ||
225 | + break; | ||
226 | + case 2: | ||
227 | + home_away = 1; | ||
228 | + ining++; | ||
229 | + hit=false; | ||
230 | + break; | ||
231 | + } | ||
232 | + out=0; | ||
233 | + base1=0; base2=0; base3=0; | ||
234 | + } | ||
235 | + else{ | ||
236 | + if(home_away == 1){ | ||
237 | + hitter_num1++; | ||
238 | + if(hitter_num1>=10){ | ||
239 | + hitter_num1=1; | ||
240 | + } | ||
241 | + } | ||
242 | + else if(home_away == 2){ | ||
243 | + hitter_num2++; | ||
244 | + if(hitter_num2>=10){ | ||
245 | + hitter_num2=1; | ||
246 | + } | ||
247 | + } | ||
248 | + } | ||
249 | + | ||
250 | + } | ||
251 | + var score = [score1, score2]; | ||
252 | + return score; | ||
253 | +} |
1 | const express = require('express'); | 1 | const express = require('express'); |
2 | const app = express(); | 2 | const app = express(); |
3 | -app.use(express.static(__dirname)); | ||
4 | 3 | ||
5 | app.listen(8080, function(){ | 4 | app.listen(8080, function(){ |
6 | console.log('listening on 8080'); | 5 | console.log('listening on 8080'); |
7 | }); | 6 | }); |
8 | 7 | ||
9 | -app.get('/', function(req, res){ | 8 | +app.get('/test', function(req, res){ |
10 | - res.sendFile(__dirname + '/main.html'); | 9 | + res.send('test'); |
11 | }); | 10 | }); |
12 | 11 | ||
13 | -app.get('/main.html', function(req, res){ | 12 | +app.get('/', function(req, res){ |
14 | res.sendFile(__dirname + '/main.html'); | 13 | res.sendFile(__dirname + '/main.html'); |
14 | + res.sendFile(__dirname + '/main.css'); | ||
15 | }); | 15 | }); |
... | \ No newline at end of file | ... | \ No newline at end of file |
16 | - | ||
17 | -app.get('/introduction.html', function(req, res){ | ||
18 | - res.sendFile(__dirname + '/introduction.html'); | ||
19 | -}); | ||
20 | - | ||
21 | -app.get('/calendar.html', function(req, res){ | ||
22 | - res.sendFile(__dirname + '/calendar.html'); | ||
23 | -}); | ||
24 | - | ||
25 | - | ||
26 | -app.get('/simulation.html', function(req, res){ | ||
27 | - res.sendFile(__dirname + '/simulation.html'); | ||
28 | -}); | ||
29 | - | ... | ... |
... | @@ -78,6 +78,10 @@ body{ | ... | @@ -78,6 +78,10 @@ body{ |
78 | font-size:15px; | 78 | font-size:15px; |
79 | border-radius:5px; | 79 | border-radius:5px; |
80 | } | 80 | } |
81 | +.t1:hover{ | ||
82 | + color:#0053b3; | ||
83 | + background-color: #2E294E; | ||
84 | +} | ||
81 | .row{ | 85 | .row{ |
82 | display:flex; | 86 | display:flex; |
83 | justify-content: space-evenly; | 87 | justify-content: space-evenly; |
... | @@ -102,6 +106,10 @@ body{ | ... | @@ -102,6 +106,10 @@ body{ |
102 | font-size:15px; | 106 | font-size:15px; |
103 | border-radius:5px; | 107 | border-radius:5px; |
104 | } | 108 | } |
109 | +.t2:hover{ | ||
110 | + color:#be4209; | ||
111 | + background-color: #2E294E; | ||
112 | +} | ||
105 | .l{ | 113 | .l{ |
106 | width:33%; | 114 | width:33%; |
107 | height:200px; | 115 | height:200px; |
... | @@ -118,24 +126,26 @@ body{ | ... | @@ -118,24 +126,26 @@ body{ |
118 | text-align:center; | 126 | text-align:center; |
119 | } | 127 | } |
120 | .simul{ | 128 | .simul{ |
129 | + width:50%; | ||
121 | height:150px; | 130 | height:150px; |
122 | display:flex; | 131 | display:flex; |
123 | - float:left; | 132 | + margin: auto; |
124 | - margin-top:50px; | 133 | + text-align:center; |
125 | - margin-left:250px; | ||
126 | -} | ||
127 | -.but{ | ||
128 | - height:150px; | ||
129 | - margin: 0px auto; | ||
130 | } | 134 | } |
131 | .simulbtr{ | 135 | .simulbtr{ |
132 | - width:250px; | 136 | + width:200px; |
133 | height:50px; | 137 | height:50px; |
134 | color: #c9d6de; | 138 | color: #c9d6de; |
135 | border: 1px solid #c9d6de; | 139 | border: 1px solid #c9d6de; |
136 | background: black; | 140 | background: black; |
137 | - font-size:30px; | 141 | + margin-top:50px; |
142 | + font-size:20px; | ||
138 | border-radius:5px; | 143 | border-radius:5px; |
144 | + margin-right:5px; | ||
145 | +} | ||
146 | +.simulbtr:hover{ | ||
147 | + color:#7700ff; | ||
148 | + background-color: #2E294E; | ||
139 | } | 149 | } |
140 | .tb{ | 150 | .tb{ |
141 | padding: 10px 0px 0px 90px; | 151 | padding: 10px 0px 0px 90px; |
... | @@ -156,3 +166,9 @@ td{ | ... | @@ -156,3 +166,9 @@ td{ |
156 | overflow-x: auto; | 166 | overflow-x: auto; |
157 | background-color:white; | 167 | background-color:white; |
158 | } | 168 | } |
169 | +#select_list{ | ||
170 | + width:50%; | ||
171 | + margin: auto; | ||
172 | + text-align:center; | ||
173 | + margin-bottom:50px; | ||
174 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
6 | <script src = "player.js"></script> | 6 | <script src = "player.js"></script> |
7 | <script src = "temp_algorithm.js"></script> | 7 | <script src = "temp_algorithm.js"></script> |
8 | <script src = "simulation.js"></script> | 8 | <script src = "simulation.js"></script> |
9 | + <script src = "predict.js"></script> | ||
9 | </head> | 10 | </head> |
10 | <body> | 11 | <body> |
11 | <div class="container1"> | 12 | <div class="container1"> |
... | @@ -125,12 +126,11 @@ | ... | @@ -125,12 +126,11 @@ |
125 | <img src="pngs/dusan.png" id="home" class="vs"> | 126 | <img src="pngs/dusan.png" id="home" class="vs"> |
126 | </div> | 127 | </div> |
127 | <div class="simul"> | 128 | <div class="simul"> |
128 | - <div class="but"> | ||
129 | <input type="button" onclick="pre_algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2);" class="simulbtr" value="시뮬레이션"> | 129 | <input type="button" onclick="pre_algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2);" class="simulbtr" value="시뮬레이션"> |
130 | + <input type="button" onclick="add_predict();" class="simulbtr" value="승률예측"> | ||
130 | </div> | 131 | </div> |
131 | - <div class="result"> | 132 | + <div id="select_list"> |
132 | - | 133 | + <select name="pr" id="pr" onclick="predict(this.value, hitter_list1, hitter_list2, pitcher1, pitcher2);"></select> |
133 | - </div> | ||
134 | </div> | 134 | </div> |
135 | <div id="jstest"></div> | 135 | <div id="jstest"></div> |
136 | </div> | 136 | </div> | ... | ... |
... | @@ -193,8 +193,84 @@ function pre_algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2){//algorit | ... | @@ -193,8 +193,84 @@ function pre_algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2){//algorit |
193 | } | 193 | } |
194 | 194 | ||
195 | else{//아웃 | 195 | else{//아웃 |
196 | + var ran = Math.random()*0.2; | ||
197 | + if(ran>0.197){ | ||
198 | + switch(home_away){ | ||
199 | + case 1: | ||
200 | + score1 = score1 + base3 + base2 + base1 + 1; | ||
201 | + break; | ||
202 | + case 2: | ||
203 | + score2 = score2 + base3 + base2 + base1 + 1; | ||
204 | + break; | ||
205 | + } | ||
206 | + base3 = 0; | ||
207 | + base2 = 0; | ||
208 | + base1 = 0; | ||
209 | + document.getElementById('jstest').innerHTML+=("홈런!"); | ||
210 | + }else if(ran>0.1955){ | ||
211 | + switch(home_away){ | ||
212 | + case 1: | ||
213 | + score1 = score1 + base3 + base2 + base1; | ||
214 | + break; | ||
215 | + case 2: | ||
216 | + score2 = score2 + base3 + base2 + base1; | ||
217 | + break; | ||
218 | + } | ||
219 | + base3 = 1; | ||
220 | + base2 = 0; | ||
221 | + base1 = 0; | ||
222 | + document.getElementById('jstest').innerHTML+=("3루타!"); | ||
223 | + }else if(ran>0.18){ | ||
224 | + var n = Math.random(); | ||
225 | + if(n <= 0.4){ | ||
226 | + switch(home_away){ | ||
227 | + case 1: | ||
228 | + score1 = score1 + base3 + base2; | ||
229 | + break; | ||
230 | + case 2: | ||
231 | + score2 = score2 + base3 + base2; | ||
232 | + break; | ||
233 | + } | ||
234 | + base3 = base1; | ||
235 | + base2 = 1; | ||
236 | + base1 = 0; | ||
237 | + document.getElementById('jstest').innerHTML+=("2루타!"); | ||
238 | + | ||
239 | + } | ||
240 | + else if(0.4 < n && n <=0.7){ | ||
241 | + switch(home_away){ | ||
242 | + case 1: | ||
243 | + score1 = score1 + base3 + base2 + base1; | ||
244 | + break; | ||
245 | + case 2: | ||
246 | + score2 = score2 + base3 + base2 + base1; | ||
247 | + break; | ||
248 | + } | ||
249 | + base3 = 0; | ||
250 | + base2 = 1; | ||
251 | + base1 = 0; | ||
252 | + document.getElementById('jstest').innerHTML+=("2루타!"); | ||
253 | + | ||
254 | + } | ||
255 | + else{ | ||
256 | + switch(home_away){ | ||
257 | + case 1: | ||
258 | + score1 = score1 + base3 + base2; | ||
259 | + break; | ||
260 | + case 2: | ||
261 | + score2 = score2 + base3 + base2; | ||
262 | + break; | ||
263 | + } | ||
264 | + base3 = 0; | ||
265 | + base2 = 1; | ||
266 | + base1 = 0; | ||
267 | + | ||
268 | + document.getElementById('jstest').innerHTML+=("2루타!"); | ||
269 | + } | ||
270 | + }else{ | ||
196 | out++; | 271 | out++; |
197 | document.getElementById('jstest').innerHTML+=("아웃!"); | 272 | document.getElementById('jstest').innerHTML+=("아웃!"); |
273 | + } | ||
198 | 274 | ||
199 | } | 275 | } |
200 | 276 | ||
... | @@ -234,4 +310,6 @@ function pre_algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2){//algorit | ... | @@ -234,4 +310,6 @@ function pre_algorithm(hitter_list1, hitter_list2, pitcher1, pitcher2){//algorit |
234 | 310 | ||
235 | } | 311 | } |
236 | document.getElementById('jstest').innerHTML+=("<br\><br\>"+"최종스코어 : "+score1+"vs"+score2); | 312 | document.getElementById('jstest').innerHTML+=("<br\><br\>"+"최종스코어 : "+score1+"vs"+score2); |
313 | + var score = [score1, score2]; | ||
314 | + return score; | ||
237 | } | 315 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment