Giter Club home page Giter Club logo

bracketry's People

Contributors

sbachinin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bracketry's Issues

Cant go beyond order:1

const sampleData = {
rounds: [
{
name: "1st round"
},
{
name: "2nd round"
}
],
matches: [
{
title: "Match 1",
roundIndex: 0,
order: 0,
sides: [
{
contestantId: "163911",
scores: [
{
mainScore: "7",
isWinner: true
},
{
mainScore: "6",
isWinner: true
},
{
mainScore: "6",
isWinner: true
}
],
isWinner: true
},
{
contestantId: "163806",
scores: [
{
mainScore: "5"
},
{
mainScore: "2"
},
{
mainScore: "2"
}
]
}
]
},
{
title: "Match 2",
roundIndex: 0,
order: 1,
sides: [
{
contestantId: "163911",
scores: [
{
mainScore: "7",
isWinner: true
},
{
mainScore: "6",
isWinner: true
},
{
mainScore: "6",
isWinner: true
}
],
isWinner: true
},
{
contestantId: "163806",
scores: [
{
mainScore: "5"
},
{
mainScore: "2"
},
{
mainScore: "2"
}
]
}
]
},
{
title: "Match 3",
roundIndex: 0,
order: 2,
sides: [
{
contestantId: "163911",
scores: [
{
mainScore: "7",
isWinner: true
},
{
mainScore: "6",
isWinner: true
},
{
mainScore: "6",
isWinner: true
}
],
isWinner: true
},
{
contestantId: "163806",
scores: [
{
mainScore: "5"
},
{
mainScore: "2"
},
{
mainScore: "2"
}
]
}
]
},
{
title: "Match 4",

                        roundIndex: 0,
                        order: 3,
                        sides: [
                            {
                                contestantId: "163911",
                                scores: [
                                    {
                                        mainScore: "7",
                                        isWinner: true
                                    },
                                    {
                                        mainScore: "6",
                                        isWinner: true
                                    },
                                    {
                                        mainScore: "6",
                                        isWinner: true
                                    }
                                ],
                                isWinner: true
                            },
                            {
                                contestantId: "163806",
                                scores: [
                                    {
                                        mainScore: "5"
                                    },
                                    {
                                        mainScore: "2"
                                    },
                                    {
                                        mainScore: "2"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        title: "Semi Match 1",

                        roundIndex: 1,
                        order: 0,
                        sides: [
                            {
                                contestantId: "163911",
                                scores: [
                                    {
                                        mainScore: "7",
                                        isWinner: true
                                    },
                                    {
                                        mainScore: "6",
                                        isWinner: true
                                    },
                                    {
                                        mainScore: "6",
                                        isWinner: true
                                    }
                                ],
                                isWinner: true
                            },
                            {
                                contestantId: "163806",
                                scores: [
                                    {
                                        mainScore: "5"
                                    },
                                    {
                                        mainScore: "2"
                                    },
                                    {
                                        mainScore: "2"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        title: "SemiMatch 2",

                        roundIndex: 1,
                        order: 1,

                        sides: [
                            {
                                contestantId: "163911",
                                scores: [
                                    {
                                        mainScore: "7",
                                        isWinner: true
                                    },
                                    {
                                        mainScore: "6",
                                        isWinner: true
                                    },
                                    {
                                        mainScore: "6",
                                        isWinner: true
                                    }
                                ],
                                isWinner: true
                            },
                            {
                                contestantId: "163806",
                                scores: [
                                    {
                                        mainScore: "5"
                                    },
                                    {
                                        mainScore: "2"
                                    },
                                    {
                                        mainScore: "2"
                                    }
                                ]
                            }
                        ]
                    },
               ],
                contestants: {
                    163806: {
                        entryStatus: "4",
                        players: [
                            {
                                title: "D. Medvedev",
                                nationality: "RU"

                            }
                        ]
                    },
                    163911: {
                        entryStatus: "1",
                        players: [
                            {
                                title: "N. Djokovic",
                                nationality: "RS"
                            }
                        ]
                    }
                }
            };
            
            excuse my for the copy paste but im going crazy not being able to figure whats wrong here. started experimenting with samples an hour ago and for some reason, i just cant get past order 1 and the result is looking like this, am i missing something?

Screenshot 2024-03-08 210028

How to set up a BYE ?

If the number of players is NOT a power of 2, e.g. there are 61 players instead of 64, then some players get a BYE (free pass to the second round).

How can this be done? e.g. I want (in singles) the lower side of a match to show "BYE". I can leave the contestantId empty, but then it just shows as blank.

Double elimination

First of all, thank you for the amazing work done so far! Have you ever considered rendering a double elimination bracket? Or is this perhaps already implemented? I'm fiddling with this library, which I have to say is the most promising implementation of brackets I've seen, but am somewhat lost in getting this to work for double elimination. Any hints or comments are very welcome.

Not all matches shown

I am going crazy here.
These data shows only match with order 0

{"rounds":[{"name":"Round 1"}],"matches":[{"roundIndex":0,"order":0,"sides":[{"contestantId":"65","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false},{"contestantId":"56","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false}]},{"roundIndex":0,"order":3,"sides":[{"contestantId":"55","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false},{"contestantId":"66","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false}]},{"roundIndex":0,"order":2,"sides":[{"contestantId":"57","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false},{"contestantId":"67","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false}]},{"roundIndex":0,"order":1,"sides":[{"contestantId":"64","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false},{"contestantId":"54","scores":[{"mainScore":0,"isWinner":false}],"isWinner":false}]}],"contestants":{"65":{"players":[{"title":"Phuong Balistreri","nationality":"SK"}]},"56":{"players":[{"title":"Albert Fay","nationality":"MQ"}]},"55":{"players":[{"title":"Lonnie Beier","nationality":"IL"}]},"66":{"players":[{"title":"Arthur Volkman","nationality":"TK"}]},"57":{"players":[{"title":"Allie Cronin","nationality":"FK"}]},"67":{"players":[{"title":"Marci Streich","nationality":"KY"}]},"64":{"players":[{"title":"Adolph Senger","nationality":"FK"}]},"54":{"players":[{"title":"Brandy Mills","nationality":"MO"}]}}}

and these shows correct all matches
`

{"rounds":[{"name":"Round 1"},{"name":"Round 2"},{"name":"Round 3"}],"matches":[{"roundIndex":0,"order":1,"sides":[{"contestantId":"7","scores":[{"mainScore":44,"isWinner":true}],"isWinner":true},{"contestantId":"8","scores":[{"mainScore":12,"isWinner":false}],"isWinner":false}]},{"roundIndex":0,"order":2,"sides":[{"contestantId":"6","scores":[{"mainScore":45,"isWinner":false}],"isWinner":false},{"contestantId":"9","scores":[{"mainScore":77,"isWinner":true}],"isWinner":true}]},{"roundIndex":0,"order":3,"sides":[{"contestantId":"5","scores":[{"mainScore":34,"isWinner":true}],"isWinner":true},{"contestantId":"10","scores":[{"mainScore":11,"isWinner":false}],"isWinner":false}]},{"roundIndex":1,"order":0,"sides":[{"contestantId":"4","scores":[{"mainScore":33,"isWinner":true}],"isWinner":true},{"contestantId":"7","scores":[{"mainScore":11,"isWinner":false}],"isWinner":false}]},{"roundIndex":1,"order":1,"sides":[{"contestantId":"9","scores":[{"mainScore":44,"isWinner":false}],"isWinner":false},{"contestantId":"5","scores":[{"mainScore":55,"isWinner":true}],"isWinner":true}]},{"roundIndex":0,"order":0,"sides":[{"contestantId":"4","scores":[{"mainScore":25,"isWinner":true},{"mainScore":23,"isWinner":true}],"isWinner":true},{"contestantId":"11","scores":[{"mainScore":25,"isWinner":false},{"mainScore":12,"isWinner":false}],"isWinner":false}]},{"roundIndex":2,"order":0,"sides":[{"contestantId":"4","scores":[{"mainScore":45,"isWinner":true}],"isWinner":true},{"contestantId":"5","scores":[{"mainScore":32,"isWinner":false}],"isWinner":false}]},{"roundIndex":2,"order":1,"sides":[{"contestantId":"7","scores":[{"mainScore":44,"isWinner":true}],"isWinner":true},{"contestantId":"9","scores":[{"mainScore":12,"isWinner":false}],"isWinner":false}]}],"contestants":{"7":{"players":[{"title":"Briana Frami","nationality":"LK"}]},"8":{"players":[{"title":"Ian Hegmann","nationality":"ZM"}]},"6":{"players":[{"title":"Yong Abernathy","nationality":"AT"}]},"9":{"players":[{"title":"Timothy Bartoletti","nationality":"CA"}]},"5":{"players":[{"title":"Vern Kreiger","nationality":"SZ"}]},"10":{"players":[{"title":"Anisha Abernathy","nationality":"PR"}]},"4":{"players":[{"title":"Alan Bode","nationality":"CZ"}]},"11":{"players":[{"title":"Ali Gibson","nationality":"JE"}]}}}

`

I dont see any error in console, data are generated on backend by same function and visually it looks ok to me, but plenty of games do not show all matches and rounds.

Any clue why, or what to check?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.