ecridge / icetimer Goto Github PK
View Code? Open in Web Editor NEWMatch scheduling for Alternative Ice Hockey sessions.
Home Page: http://www.oxford-alts.org.uk/
License: GNU General Public License v3.0
Match scheduling for Alternative Ice Hockey sessions.
Home Page: http://www.oxford-alts.org.uk/
License: GNU General Public License v3.0
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.
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.
This should make it easier to cope with adding or removing a team mid-session in the absence of a dedicated feature.
It will probably be useful to add a shortcut or button to reset to the first game as well just in case.
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.
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.
This isn't going to be trivial, and will probably be easier to do once #1 has been accomplished.
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).
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:
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 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.