Giter Club home page Giter Club logo

icetimer's People

Contributors

ecridge avatar

Watchers

 avatar

icetimer's Issues

Create a window to display help and shortcuts

Create a modal window which displays version number, some brief help text, and a list of keyboard shortcuts.

Make this easy to access, e.g. by clicking a question mark icon or by pressing escape.

Write session data to a log

Make IceTimer output ice-time, total time and total number of teams to a log after each session.

The easiest way to implement this will probably be to write the log when the program is terminated, as this will be immune to restarted sessions (e.g. due to a change in the number of teams) and should work regardless of how the program is exited.

It will probably be useful to group terms into different log files so the writer should check for large gaps between sessions.

Rewrite the MatchList class to use arrays

MatchList currently uses Table objects to manage the list of matches. This is fine for loading and saving static data but gets in the way if you try to do anything more dynamic (especially if you want to modify data across multiple rows).

Rewriting the class to use arrays would make it easier to implement features that require significant modification off cells in the list such as scoring and on-the-fly addition/removal of teams.

Make it possible to rename teams

For the workaround in #5 to be useful, it has to be possible to renumber teams. For instance, if there are 10 teams and number 7 drops out mid-session, you'll need to restart the session with 9 teams and use the new number 7 to represent number 10.

For the sake of a couple lines of code, it is probably worth expanding this to let teams be named as an arbitrary String, so that teams can optionally specify a (short) team name or other identifier rather than the default number.

Add ability to add and remove teams on the fly

This isn't going to be trivial, and will probably be easier to do once #1 has been accomplished.

Simple fix

A simple solution would be to add buttons which can increment or decrement the number of teams playing one an a time. The decrement button should ask which team to remove and then start a new session (with one less team) from the same game number with the number of the last team replacing that of the team being removed (or, incrementing by one all team numbers greater than or equal to the team being removed โ€“ whichever provides the most continuity). The increment button should start a new session with one more team with the new team taking the team number one greater than the last team.

This is a partial solution in that it allows addition and removal of teams without interrupting the session (or causing any confusion with regards to numbering), but does not make any attempt to rectify the inevitable discontinuity at the time of the switch (i.e. if you consider the period either side of the team addition/removal, there will be some teams that play 3 or 4 consecutive games while others play none at all).

Full solution

At present IceTimer works its way through precompiled lists of fixtures generated by Matchgen, which are ordered so that all teams are on and off the ice regularly throughout the session, whilst making sure that each team gets to play every other.

Smooth addition and removal of teams requires that the algorithm that generates the fixtures is aware of the change and can try to make the transition continuous. There are several ways that this functionality could be added to IceTimer:

  • Assimilate Matchgen's code into IceTimer's MatchList class and have it regenerate the fixtures whenever a team is added or removed, specifying initial weightings for each team based on the time since they last played. This is probably the best solution in terms of extensibility, but requires significant refactoring of IceTimer's code.
  • Continue to load precompiled fixtures into MatchList, but add code to help it choose the best point in the list to restart the session. This may be easier to implement but is essentially going further down a dead end.
  • Scrap Matchgen and develop a new dynamic algorithm for MatchList to use. I guess this would be neat but it seems like a huge waste of time.

Assimilating Matchgen's code is probably the most worthwhile, since the second option is only a small improvement over the quick fix.

Implement a simple scoring system

Implement a simple scoring system that lets you choose which team was the winner (or if there was a draw) at the end of each match. At the end of each session display a score histogram showing the winning teams.

It's probably best to use an all positive system like 3 for a win and 1 for a draw so that at the end you can just ignore any teams with score zero (i.e. because they weren't scoring or didn't report their scores to the box). Also don't bother displaying any score information if no teams are being scored.

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.