Drarig29 / brackets-manager.js

A simple library to manage tournament brackets (round-robin, single elimination, double elimination).
https://drarig29.github.io/brackets-docs
MIT License
254 stars 40 forks source link

Make `manager.get.stageData()` return an type similar to the database's #75

Closed Drarig29 closed 3 years ago

Drarig29 commented 3 years ago

Currently, manager.get.stageData() returns an object of type StageData.

interface StageData {
    stage: Stage,
    groups: Group[],
    rounds: Round[],
    matches: Match[],
    participants: Participant[],
}

The idea would be to return an object similar to the database. And also return the match games (need to do https://github.com/Drarig29/brackets-model/issues/4 before).

We would then be able to get rid of manager.get.matchChildren(), which is useless because it does nothing more than using storage.select().

Drarig29 commented 3 years ago

Update manager.import() and manager.export() tests after this change (use match games).