-
Notifications
You must be signed in to change notification settings - Fork 0
davidtcook/challenge_cup_scripts
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is based on the following "specification" given to me : # Spec # ================================================================================= # There will need to be a file containing the ranking list - ranking, name, and points. # Equal points = equal ranking. Then skip as discussed, 1,2,2,4 :) # Output from the script should be an update ranking list in the file. For bonus points, output it coded as a html table I can cut & paste onto the website ;) # Input will be a list of name pairs, winner and loser. I can give it in a file as a literal list of pairs if that makes life easier. # The loser gets their current points value incremented by 1. # If the winner is ranked equal or higher than the loser, they get their points incremented by 2. #otherwise, the winners points are incremented by (Losers_Rank - Winners_Rank)+1. # Re-sort the ranking list by points and update ranking position before processing the next winner/loser pair. # ================================================================================== 1. Assumes a file called "rankings" exists, formatted as: Name1,points1 Name2,points2 etc In descending order of points. 2. Input files are in the format : Winner Loser Winner_score Loser_score Referee Weapon(F/E/S) Can contain one or more bout results. Ranking updates will be processed in the order of bouts in the input file. 3. Main script - update_rankings.sh Usage: update_rankings.sh <input file> Processes the bout results from the input file, an # Usage : ruby cc.rb <winner> <loser> # Result - rankings file updated with new points }
About
Scripts for running our fencing club's "Challenge Cup" competition through the year
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published