Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-open-source
/
BaseBallSimulator
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정주희
2021-06-04 08:19:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d670d0d94ef745766dbc8b720bd9752ea299d3c1
d670d0d9
1 parent
bb85129e
볼넷 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
temp_algorithm.js
temp_algorithm.js
View file @
d670d0d
...
...
@@ -167,7 +167,7 @@ function pre_algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitch
else
if
(
pitcher
[
2
]
<
num
&&
(
num
<=
pitcher
[
2
]
+
pitcher
[
1
]
*
0.01
)){
//볼넷
if
(
base1
==
1
&&
base2
==
1
&&
base3
==
1
){
if
(
base1
==
1
&&
base2
==
1
&&
base3
==
1
){
//만루 밀어내기 득점 -> 스코어 ++
if
(
home_away
==
1
){
score1
++
;
}
...
...
@@ -175,8 +175,12 @@ function pre_algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitch
score2
++
;
}
}
else
{
if
((
base2
==
1
&&
base1
==
0
)
||
(
base3
==
1
&&
base1
==
0
)){
else
{
//스코어 추가되지 않는 경우
if
((
base2
==
1
&&
base1
==
0
)
||
(
base3
==
1
&&
base1
==
0
)
||
(
base2
==
1
&&
base3
==
1
&&
base1
==
0
)){
//2루만 채워져있거나 3루만 채워져있거나 2,3루만 채워져있거나
base1
=
1
;
}
else
if
(
base1
==
1
&&
base3
==
1
&&
base2
==
0
){
//1루 3루 채워져있고 2루 비워져있거나
base2
=
base1
;
base1
=
1
;
}
else
{
...
...
Please
register
or
login
to post a comment