mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-11 13:46:10 -05:00
Rename
This commit is contained in:
@@ -74,7 +74,7 @@ export function setMatchResults(
|
||||
}
|
||||
|
||||
if (currentlyCompleted) {
|
||||
resetMatchResults(stored);
|
||||
clearWinner(stored);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -82,11 +82,11 @@ export function setMatchResults(
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the results of a match.
|
||||
* Clears the winner of a match, marking it as not completed.
|
||||
*
|
||||
* @param stored A reference to what will be updated in the storage.
|
||||
*/
|
||||
export function resetMatchResults(stored: MatchResults): void {
|
||||
export function clearWinner(stored: MatchResults): void {
|
||||
stored.winnerSide = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export function resetMatchResults(
|
||||
)
|
||||
throw Error("The match is locked.");
|
||||
|
||||
helpers.resetMatchResults(stored);
|
||||
helpers.clearWinner(stored);
|
||||
propagator.applyMatchUpdate(stored);
|
||||
|
||||
if (!helpers.isRoundRobin(stage) && !helpers.isSwiss(stage))
|
||||
|
||||
Reference in New Issue
Block a user