Toggle navigation
Toggle navigation
This project
Loading...
Sign in
전세계
/
FakerQuiz
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Ubuntu
2020-06-21 14:40:09 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fba6dae4e75628c81062d4ca33bea63e3d6af010
fba6dae4
1 parent
59aa07bf
기능: 플레이한 챔피언 퀴즈 생성
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
app.js
app.js
View file @
fba6dae
...
...
@@ -320,6 +320,27 @@ function generateQuiz() {
info
=
`
${
fakerData
.
name
}
의 LCK 통산 승률 :
${
lckWR
}
%`
;
generateOX
(
quizO
,
quizX
,
info
);
//#endregion
//#region 챔피언 플레이 ox
var
champions
=
fakerData
.
champions
;
var
champList
=
Object
.
keys
(
champions
);
var
rareChampList
=
[];
for
(
i
=
0
;
i
<
champList
.
length
;
i
++
)
{
if
(
champions
[
champList
[
i
]].
totalGamePlay
<=
2
)
{
rareChampList
.
push
(
champions
[
champList
[
i
]]);
}
}
for
(
i
=
0
;
i
<
4
;
i
++
)
{
var
champIndex
=
Math
.
floor
(
Math
.
random
()
*
rareChampList
.
length
);
quizO
=
`
${
fakerData
.
name
}
는 대회에서 '
${
rareChampList
[
champIndex
].
name
}
'를 플레이한 적이 있다.`
;
quizX
=
`
${
fakerData
.
name
}
는 대회에서 '
${
rareChampList
[
champIndex
].
name
}
'를 플레이한 적이 없다.`
;
info
=
`'
${
rareChampList
[
champIndex
].
name
}
' :
${
rareChampList
[
champIndex
].
totalGamePlay
}
게임,
${
rareChampList
[
champIndex
].
totalWin
}
승,
${
rareChampList
[
champIndex
].
kDA
}
KDA`
;
generateOX
(
quizO
,
quizX
,
info
);
champList
.
splice
(
champIndex
,
1
);
}
//#endregion
}
function
generateOX
(
quizO
,
quizX
,
moreInfo
)
{
...
...
Please
register
or
login
to post a comment