+export const isComplete = (tournament, round) => {
+ if (!tournament || !tournament.participants) return false;
+ if (!round || !round.results) return false;
+ return tournament.participants.length === round.results.length &&
+ round.results.filter(r => !r.has_finished).length === 0;
+};
+
export const patchResult = (round, result) => {
if (!round) return round;
if (!round.results || !round.results.length) {
};
export default {
+ isComplete,
patchResult,
};