I would like to run this on palm os
[url removed, login to view]
Download the source code from here and modify for following needs.
Add a table with following calculations
1 Each team in a division has a 'points total' which represents current form.
2 The 'average' number of points for the teams within a division remains constant at 1000.
3 For each match played the home and away teams contribute a percentage of their points to a kitty.
4 The percentage contribution of the home team is greater than that of the away team, and so reflects home advantage.
5 The winning team takes the complete points kitty.
6 Teams which draw share the kitty.
CALCULATING 'FORM' POINTS (1)
The HOME team begins with a points total of htot
The AWAY team begins with a points total of atot
For each match played the home team contributes x%
of its points and the away team contributes y%
( x is greater than y ).
The actual points contributions of the home and
away teams are represented by hgives and agives
hgives = x% of htot
agives = y% of atot
kitty = hgives + agives
The number of points each team receives from the
kitty is represented by hgets and agets.
If a home win then
hgets = kitty agets = 0
If an away win then
hgets = 0 agets = kitty
If drawn game then
hgets = kitty / 2 ( rounded down )
agets = kitty - hgets
( if kitty is an odd number the away team
gets the extra point )
The nett gain or loss to each team is hnett
hnett = hgets minus hgives
anett = agets minus agives
Finally new points totals are calculated for
htot = htot plus hnett atot = atot plus anett
Some specific examples will help demonstrate how the system operates.
Consider three football teams starting out with the points totals
CALCULATING 'RATEFORM' POINTS (2)
Starting points ....
Blackburn 1232 Each to play Oldham (478 points)
Man Utd 1804
West Ham 486
Match 1. Blackburn v Oldham - result HOME win
Blackburn ( home ) Oldham ( away )
1232 pts X 0.07 = 86 478 pts X 0.05 = 24
Kitty has 110 points
From kitty win gives 110 From kitty loss gives 0
Nett gain +24 Nett Loss -24
Match 2. Oldham v West Ham - result AWAY win
Oldham ( home ) West Ham ( away )
478 pts X 0.07 = 33 486 pts X 0.05 = 24
Kitty has 57 points
From kitty, loss gives 0 From kitty win gives 57
Nett Loss -33 Nett Gain +33
Match 3. Man Utd v Oldham - result DRAWN game
Man Utd ( home ) Oldham ( away )
1804 pts X 0.07 = 126 478 pts X 0.05 = 24
Kitty has 150 points
From kitty, draw 75 From kitty draw gives 75
Nett Loss -51 Nett Gain +51
Final points ....
Blackburn 1256 Oldham 472
Man Utd 1753
West Ham 519
Form Table must update automatically when I update football league table results I would like to archive the results for future reference.