Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
chesstournament-ranking-criteria
Advanced tools
Most common ranking criteria in chess tournaments to use with chesstournament.js
This module provides the most common ranking and seeding criteria in chess tournaments and can be used with chesstournament.js.
npm install chesstournament-ranking-criteria
var Criteria = require('chesstournament-ranking-criteria');
// create seeding
tournament.players.seeding.criteria = [ Criteria.Alphabetical(), Criteria.Random() ];
tournament.players.seeding.generate();
// get MatchPoints
tournament.teams['some Team'].getValue(Criteria.MatchPoints());
Compare the given Players or Teams by their names (the .name.toString()
method is used).
criterion = Criteria.Alphabetical();
Compare the given Players or Teams by their Buchholz, higher is better.
criterion = Criteria.Buchholz();
// -- or --
var options = {
useFIDEmode: true, // use FIDE mode for unplayed games of opponents,
lowestCuts: 0, // for Median Buchholz specify cuts
highestCuts: 0
}
criterion = Criteria.Buchholz(options, pointValues);
Compare the given Players or Teams by the sum of their opponents' Buchholz, higher is better.
criterion = Criteria.BuchholzSum();
// -- or --
var options = ...; // same as for Criteria.Buchholz()
criterion = Criteria.Buchholz(options, pointValues);
Compare the given Teams by their match points, higher is better.
criterion = Criteria.MatchPoints();
// -- or --
var options = {
winMode: 'more than opponent', // or 'more than half'
};
criterion = Criteria.MatchPoints(options, pointValues);
Compare the given Players or Teams by their points, higher is better.
criterion = Criteria.Points();
// -- or --
criterion = Criteria.Points(pointValues);
Create a random ranking for the Players or Teams.
criterion = Criteria.Random();
Compare the given Players or Teams by their ratings (the .getRating()
method is used),
higher is better.
// with options being the same as in Player.getRating() or Team.getReating()
criterion = Criteria.Rating(some, options);
Compare the given Players or Teams by their seeding, lower is better.
criterion = Criteria.Seeding();
Compare the given Players by their FIDE-title by the following order:
'GM' > 'IM' > 'WGM' > 'WIM' > 'FM' > 'WFM' > 'CM' > none
criterion = Criteria.Title();
In case you want to use one of the defined criteria but only with the
reverse sort order, simply use the Criteria.reverse()
method:
// create criterion which reverses the current seeding
criterion = Criteria.reverse(Criteria.Seeding);
FAQs
Most common ranking criteria in chess tournaments to use with chesstournament.js
The npm package chesstournament-ranking-criteria receives a total of 1 weekly downloads. As such, chesstournament-ranking-criteria popularity was classified as not popular.
We found that chesstournament-ranking-criteria demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.