Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another-web
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
tabulator-another-web
Commits
b5fc8f01
Commit
b5fc8f01
authored
Aug 10, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复比分错误
parent
3facc8b5
Pipeline
#40049
passed with stages
in 2 minutes and 44 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
src/script/match.ts
src/script/match.ts
+2
-0
src/script/participant.ts
src/script/participant.ts
+6
-4
No files found.
src/script/match.ts
View file @
b5fc8f01
...
...
@@ -20,6 +20,8 @@ class Match {
childMatchId
:
number
;
constructor
(
obj
:
MatchObject
,
p
:
Array
<
Participant
>
)
{
console
.
log
(
obj
.
player1Score
)
console
.
log
(
obj
.
player2Score
)
this
.
id
=
obj
.
id
;
this
.
tournamentId
=
obj
.
tournamentId
;
this
.
round
=
obj
.
round
;
...
...
src/script/participant.ts
View file @
b5fc8f01
...
...
@@ -46,11 +46,13 @@ class Participant {
}
getScore
=
(
matches
:
Array
<
Match
>
,
t
:
Tournament
)
:
void
=>
{
const
max
=
Math
.
max
(...
matches
.
filter
(
i
=>
i
.
status
==
'
Finished
'
||
i
.
status
==
'
Running
'
).
map
(
i
=>
i
.
round
));
const
joins
=
matches
.
filter
(
i
=>
this
.
id
==
i
.
player1
.
id
||
this
.
id
==
i
.
player2
.
id
);
const
m
=
{
win
:
matches
.
filter
(
i
=>
this
.
id
==
i
.
winnerId
).
length
,
draw
:
matches
.
filter
(
i
=>
(
this
.
id
==
i
.
player1
.
id
||
this
.
id
==
i
.
player2
.
id
)
&&
Number
.
isNaN
(
i
.
winnerId
)
).
length
,
lose
:
matches
.
filter
(
i
=>
(
this
.
id
==
i
.
player1
.
id
||
this
.
id
==
i
.
player2
.
id
)
&&
!
Number
.
isNaN
(
i
.
winnerId
)
&&
i
.
winnerId
!=
this
.
id
).
length
,
bye
:
Math
.
max
(...
matches
.
filter
(
i
=>
i
.
status
==
'
Finished
'
||
i
.
status
==
'
Running
'
).
map
(
i
=>
i
.
round
))
-
matches
.
filter
(
i
=>
this
.
id
==
i
.
player1
.
id
||
this
.
id
==
i
.
player2
.
id
)
.
length
win
:
joins
.
filter
(
i
=>
this
.
id
==
i
.
winnerId
&&
i
.
status
==
"
Finished
"
).
length
,
draw
:
joins
.
filter
(
i
=>
i
.
winnerId
===
null
&&
i
.
status
==
"
Finished
"
).
length
,
lose
:
joins
.
filter
(
i
=>
i
.
winnerId
!==
null
&&
i
.
winnerId
!=
this
.
id
&&
i
.
status
==
"
Finished
"
).
length
,
bye
:
max
-
joins
.
length
};
this
.
score
=
{
score
:
m
.
win
*
t
.
ruleSettings
.
winScore
+
m
.
draw
*
t
.
ruleSettings
.
drawScore
+
m
.
bye
*
t
.
ruleSettings
.
byeScore
,
...
...
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