Qleague Page

Qleague is a program to keep chess league results, and to generate a web-page where the league results can be examined in detail.
Click here to see a sample web page.
Click here to see the actual results of the 2000-2001 Armstrong Cup.

It was written with the Armstrong Cup in mind (division 1 of the Leinster chess league) but the program was written to cater for various methods of assigning points to teams (match points only, game points only, match points + game points), with variable team sizes and with single or double-round fixtures.

The program is written in Free Pascal. It has only been tested using using Windows 95/98, but by recompiling the source code it should run on Linux, OS2 and DOS. If you have any problems running it, or if you have any ideas about how to improve it, email the author, a member of Elm Mount chess club. (Or, change the program yourself!).

The following are available for download:-
qleague.exe, the Win95/98 executable
animals.lgf, the league file used to generate the example above
qleague.pp, the program source code. Get the compiler here.

Qleague is a command-line style program. (There is a short example here.)
On starting, the user is presented with a prompt ( > ) where the following commands (some require extra parameters) can be entered:-

Available Commands
qquit
nnew league
cchange league
ssave current league
useuse an existing league file
apadd player
cpchange player
atadd team
lllist league
lplist players
lrlist results
ltlist teams
umuse match
tdefine team
rdefine result
swapswap home and away teams
xtdisplay cross-table
ppplayer performance
mabwpmake a big web page
histdisplay program history
withdrawwithdraw a team, deleting its match results and players
tfgenerate random players and results for all teams

Top of Page Commands Example
Output can be redirected to a file, e.g.
xt > myfile.dat creates a file containing a crosstable
xt >> myfile.dat appends a crosstable to a file

Top of Page Commands Example
Quit (q)
Enter q to quit. You may be prompted to save the current league file if you have changed it.

Top of Page Commands Example
New League (n)
n -9 -d -w -h -m league-name
where 9 represents the no. of players per team,
-d means double-round fixtures,
-w means a winbonus of 2 points, and a drawbonus of 1,
-h means the hometeam is white on board 1 and
-m means that the league is based on match points not game points.
E.g. n -8 Armstrong Cup 1998-99

Top of Page Commands Example
Change League (c)
c -9 -d -w -h -m -n"league-name"
The change league command is similar to the new-league command except that the league name is entered via the -n option. Enter the name in double-quotes with no spaces between the -n and the quotes. The -d, -w, -h and -m options toggle the value of their corresponding options.
E.g. c -n"My very own league"

Top of Page Commands Example
Save (s)
E.g.
s saves the current league file
s newname saves the current league file as "newname.lgf".

Top of Page Commands Example
Use an existing league file(use)
E.g. use myfile opens "myfile.lgf". You may be prompted to save the currently open file

Top of Page Commands Example
Add playerap adds a player
ap team-code rating player-name
E.g. ap her 1250 Gertrude Giraffe adds a rated player
ap bir 0 Richard Rook adds an unrated player to a team

Top of Page Commands Example
Change Player (cp)
cp -r9999 -n"Player Name" player-number
E.g.
cp -r1250 25 changes player 25's rating to 1250
cp -n"William Walrus" 23 changes player 23's name
Top of Page Commands Example
Add Team (at)
at team-code team-name
Team codes should always be 3 characters long.
E.g.at arc Arctic Dwellers

Top of Page Commands Example
List league details (ll)
This command shows the league parameters (team-size etc.)
E.g. ll

Top of Page Commands Example
List players(lp)
E.g.
lp lists all players
lp her lists only players on the Herbivore team

Top of Page Commands Example
List results (lr)
This command shows the codes used when entering results. Normally 1,0 and = would be used representing a home win, an away win and a draw respectively. There are extra codes to cater for defaults with no penalties and defaults where the defaulting team is penalised 1 point for defaulting.
E.g. lr

Top of Page Commands Example
Lists the teams (lt)
E.g. lt

Top of Page Commands Example
Use match (um home-team away-team)
This commands creates or displays a result card where the players and match results can be entered. If the match has already been entered it will be redisplayed. In a single round league, if a match already exists involving the two teams, that match will be displayed, regardless of the order in which the team codes were entered. The command prompt is altered to include the team codes.
E.g. um her pri
displays the result card for the match between the Herbivore and Primate teams and alters the command prompt to "her-pri>".
Top of Page Commands Example
Define a match team (t)
Define the players on one of the teams whose result card is displayed.
E.g.
t pri 6 7 9 19 defines the Primate for the match as containing players with codes 6, 7, 9 and 19
t pri . . 8 sets board 3 on the primates team to player 8. A full-stop is used to mean no-change in the current value.
Top of Page Commands Example
Define a match result (r)
Define the results of the match whose result card is displayed.
E.g.
r 1 1 0 = defines the result as home wins on boards 1 and 2, an away win on board 3 and a draw on board 4.
r . = sets the result of board 2 to a draw. A full-stop is used to mean no-change in the current value.
Top of Page Commands Example
Swaps the home and away teams (swap)
If you have entered the home and away teams the wrong way around in a single round league, then this command allows you to swap them around. This command can only be used after a "use match" command. E.g. swap

Top of Page Commands Example
Generate a cross-table (xt)
This command displays a cross-table from the results entered
E.g. xt

Top of Page Commands Example
Player Performance (pp)
pp player-number
This shows a players performance record.
E.g. pp 12 shows the performance for player 12

Top of Page Commands Example
Make a big web page (mabwp)
This command generates a web page showing:-
a cross-table
a result cards for every match entered
a list of the players in each team showing their total score
a list of each player's opponents and their score
Clicking on team names, player names, or match-scores from the cross-table jumps to the appropriate part of the page.
E.g. mabwp mypage creates a html page called "mypage.htm"

Top of Page Commands Example
Withdraw a team from the league (withdraw)
withdraw abbreviation
E.g. withdraw pri withdraws the primates team from the animals league. All matches and players associated with the team are also deleted.
Top of Page Commands Example
Displays the program history (hist)
This shows the history of the program
E.g. hist
Top of Page Commands Example
This command fills the league up with generated names and random results. You are prompted to confirm that you want to go ahead with this!
> E.g. tf
Top of Page Commands Example
The following example shows how the program works :-

Save "qleague.exe" and "animals.lgf" in the same directory.
Run "qleague.exe".
Type use animals and press return. (You will not get an error message unless something goes wrong).
Type xt and press return. A cross-table is displayed.
Type ll and press return. Details of the league format are displayed. (Note that the animals league is set up so that teams are awarded an extra 2 points for a match win, and 1 for a draw).
Type lt and press return. A list of the teams in the league is displayed.
To add a new team to the league, proceed as follows:
at arc Arctic Dwellers
Now try xt again - the Arctic Dwellers appear at the bottom of the league. To add some players to the Arctic Dwellers, proceed as follows:-
ap arc 2010 Peter Polar-Bear
ap arc 1900 Walter Walrus
ap arc 1650 Kevin Killer-Whale
ap arc 1355 Roger Reindeer
Now, to add a match result for the match Predators vs Arctic Dwellers proceed as follows:-
um pre arc
A result card will be displayed.
Display the players on the Predators team as follows:-
lp pre
Select the team as follows:-
t pre 14 15 16 21
If you want to change board 4 from player 21 to 20, you can do it by
t . . . 20
Now select the Arctic Dwellers team
lp arc
t arc 22 23 24 25
Now enter the result
lr shows the possible results.
r 0 0 = 0
Now type xt again.
The cross-table includes the result.

To generate a new web-page from the results, proceed as follows:-
mabwp mypage
This will create a html page named "mypage.htm". Have a look at it using your browser.

Save the changes to the league by entering s.

Exit from the program by entering q.


Top of Page Commands Example
Ciaran Quinn, 5th March 1999