Giter Club home page Giter Club logo

elswisser's People

Contributors

bsmithgall avatar will-smithgall avatar

Watchers

 avatar  avatar  avatar

elswisser's Issues

Handle byes/odd number of players

Right now everything only works because we have an even number of players going into the pairings. We need to allow for byes given that there are odd numbers of players.

Tournament stats page

Could have some fun statistics about various tournaments:

  • % wins with white vs black pieces
  • Number of rating upsets
  • Game length

Add "current games" tab

With a double elimination tournament, it would be good to have a view of all games that are currently playable regardless of rounds in the pair-card format.

Add data seeds

Should include:

  • A group of players (~12?)
  • A completed tournament
  • An in-progress tournament

There's some information about how to do this in here.

Fix all the current weird page bugs

  • Tournament show page seems to hang forever
  • Tournaments list doesn't link to the individual tournaments
  • Rounds results page seems to be double-hitting the DB for all of the games in the round
  • Tournament front page doesn't seem to work, though it should probably just redirect to a status page.

Might be good to try and get the basic tests working again and hook in CI, though that could be another issue.

Introduce "Round" and "Game" schema

Should both live inside of a "Rounds" context.

Rounds schema:

  • Tournament ID
  • Round number (unique per tournament)

Games schema

  • Color assignments (references to players)
  • Result
  • Game link

Enable manual pairings

Inside of the rounds context there should be a "pairings" page. To start, we should be able to manually manage pairings (e.g. this player with this player) to generate new game records inside the round.

For this to be "done":

  • The show route on tournament/id/rounds/id/pairing should have a nice little interactive table which shows all the players along with their progress in the tournament.
  • When a player is selected, it should show their detailed tournament history and put them in for a new game with white in the next round.
  • Then you should be able to match another player from there.

Here's a screenshot of the coronate pairings view.
image

Implement results pages

Need to show tournament results:

  • Player crosstable
  • Placement list
  • Tiebreakers

To figure out: should results be calculated on the fly? Or stored/cached in the database (perhaps at the end of each round)? Probably easiest to calculate on the fly for now and then cache them later.

GamePlayer needs to exist

Right now we have white_id and black_id on the game table, which is miserable. There needs to be a M2M table to connect them in order to do basic stuff.

Some bugs with byes

  • Can't load the matchup card if one of the players has had a bye due to a crash
  • Bye games don't have finished_at, meaning they show up in a strange place in the player's game history

Matchup information box

We should have a little modal popup from the rounds view that shows the players tournament histories etc. Should be able to re-use the little boxes from the pairings page.

Unsuck the layout on mobile

Right now it's not responsive at all, but it should be since it would be nice to manage this stuff via my phone.

List views

  • Fix giant blob of whitespace at the top

Show views

  • Make the chessboard unfucked on mobile

Navbars

  • Make tournament sidenav go into a hamburger at small widths. The way to do this is probably to have the topnav take a sidenav as a slot.
  • Hide Elswisser text at small widths, only show icon

Tournament management

  • Have roster be single column at small widths
  • Have pairings be single column at small widths, preferably with match button on the bottom if possible
  • Make heading row not completely overflow on the x-direction

Generate application chrome

Need to provide basic application layout:

  • Replace the main landing page
  • Navbar (top for main nav, side for current tournament maybe?)

Note that phoenix uses Tailwind as of 1.17, so we'll need to figure out how that is supposed to work as well.

Support for bracket-style elimitation tournaments

Should be able to slot into the existing data model decently well, though the routes might change a bit.


Edit: this is pretty complicated. Here's a rough checklist of what is needed to get this to work:

  • Tournament type polymorphism based on a column table, and allowing it to be set when creating a new tournament.
  • First round game + round creation. Should automatically generate seeds based on player ratings and pair players appropriately. Will also need to handle first round byes, etc.
  • Layout. Will need to figure out how to dynamically draw a bracket, etc.
  • Following round game creation. Need to figure out how to move winners forward into the correct slots.

Build out player roster page

Need to be able to:

  • Add a player to a tournament
  • Remove a player from a tournament (dropouts).
  • View the current roster

Implement round progress page

We need to implement a round progress page which shows all the games in a given round, allows for selection of results, etc. Here's the equivalent coronate page:

Note that both this and the pairings page (#2) are part of the same route in the coronate UI, though I think we should probably use two separate pages for this.

image


Need to:

  • Fetch out all of the games from a given tournament round.
  • Put them in a table that allows users to take actions (add a game result, add a game URL)

Visual cruft on double elimination brackets

All of the ::after stuff was build around perfect tree single-elimination brackets, there's a bunch of weird stuff around:

  • 2 match --> 2 match rounds
  • Individual matches

Additionally, perhaps the championships stuff should be separate?

Design and build tournament display shell

Needs side navigation with current tournament name, links to various things, quick information. We can probably again use Coronate as a guide with some improvements.

Navigation by slug

Instead of tournament ID we should enable navigation by tournament slug. This of course requires us to ensure that tournaments are uniquely named, so we'll need to add a unique name index.

Expose to internet

  • Figure out tailscale kubernetes operator and/or cloudflare tunnel (probably the second one for global access?)

Flash messages out by default after 2s

We should be able to do this on live views by sending an update via send/2 and handle_info/2; there's an example in the PGN live view we can use to base this off of. There's another approach laid out in this blog post as well.

Handle multi-game matches

This will require some reworking of the internals, but it would be nice to support multi-game matches per round. Right now, the assumption is that you have a single "game" per round (which has a unique link, winner and loser, etc), but it would be cool to support something like "first to 2.5" style scoring.

Probably the way to do this that is lowest lift to what exists now is to do Tournament -- 1:M --> Round -- 1:M --> Match -- 1:M --> Game.

Then the Tournament could start taking in some configuration options. This would also be a nice way to jumpstart into support for a round-robin style tournament (everyone plays everyone else).

Add ability to get round "status"

For the tournament side nav (and just in general), it would be good to figure out a way to get the "status" of a given round. We can probably be pretty naive about this:

  • A round has status NOT_READY if the prior round is not status COMPLETE
  • A round has status PAIRING if the prior round is complete but not all players are paired yet
  • A round has status PLAYING if all players are paired, but not all games are completed
  • A round has status COMPLETED if all games in that round are completed

I don't think it makes sense to store this field in the database, but rather to calculate it on the fly. We can calculate it for a single round when we load up an individual round pairing page, and for all rounds in a tournament when we load up the tournament view pages.

Implement crosstable page

Need to:

  • Implement a Tournament.crosstable() method that calculates out a crosstable. There should be a clever way to do most of this in SQL directly.
  • Stick the crosstable in a table

Build out tournament scores page

Need to:

  • Implement a Round.scores() function which returns out a crosstable of scores. At some point this is going to need to also handle tiebreaking. Here's a screenshot of tiebreak rules suggested by USCF. We can probably punt on implementing these until later, since it seems like it's going to require either some pretty complicated SQL or parsing things in code directly.
  • Stick the scores in a table.

image

Improved Tests

Current scores tests are not too helpful, should make ones that are more reflective of reality
image

Player rating history

It would be nice to keep a rating history so we could see how player ratings change over time.

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.