Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-arena-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-arena-api
Commits
11e6e4fd
Commit
11e6e4fd
authored
Aug 18, 2018
by
itecreator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update rule
parent
c132bbc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
utils/utils.js
utils/utils.js
+21
-0
No files found.
utils/utils.js
View file @
11e6e4fd
...
...
@@ -13,8 +13,29 @@ let Utils = {
let
eB
=
1
/
(
1
+
Math
.
pow
(
10
,
(
rA
-
rB
)
/
400
))
let
rrA
=
rA
+
k
*
(
sA
-
eA
)
// 加分高于16
if
(
(
rrA
-
rA
)
>
16
)
{
rrA
=
rA
+
16
;
}
// 扣分低于8
if
(
(
rA
-
rrA
)
<
8
)
{
rrA
=
rA
-
8
;
}
let
rrB
=
rB
+
k
*
(
sB
-
eB
)
// 加分高于16
if
(
(
rrB
-
rB
)
>
16
)
{
rrB
=
rB
+
16
;
}
// 扣分低于8
if
(
(
rB
-
rrB
)
<
8
)
{
rrB
=
rB
-
8
;
}
return
{
ptA
:
rrA
,
ptB
:
rrB
}
},
getExpScore
:
function
getExpScore
(
expA
,
expB
,
scoreA
,
scoreB
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment