LotStat

"It's not you!"


** Introduction

Yes, the thought of a big win on the Lottery 
is  pretty  exciting. Yes,  we all  know  that
there's  a one in 14 million  chance  of  this
happening for  any one  of our darling lines.
But  it's  hard  to  *feel*  how  small  that 
chance is!

Hence LotStat. 

You can  choose up to  five lines, and then 
LotStat will play the lottery over and over 
again.  As it does,  it records how many  of 
each kind  of match  happens,  and  when it 
happened  first and last. 

You can watch each draw,  or go off and do 
other  things and have  LotStat  beep when 
you hit,  say,  a Match 4  or higher,  or when 
a  particular  number  of  draws  have  been 
made.  (LotStat will still obey your Auto-off
settings.)

(For  the record:  using  LotStat  with five 
fixed lines,  it took half a  million games (or 
10,000 years)  to get a  jackpot!  By which 
time I'd  (a)  have spent  much  if not  all of 
my  winnings and  (b) have been dead a long 
time!   I draw  your  attention to  LotStat's 
icon...)


** Installation

Put lotstat.opa into \app on any drive.

Create a directory \lotstat.

If you want, put the example files *.lot
into \lotstat.

If you want online help, put lotstat.rsc 
into \opd or \app\lotstat

Install LotStat on the System Screen (or
in a group).


** Startup

When you start  LotStat  for the first time, 
or on a new file,  you are presented with the 
Edit Lines  dialog  (see the  Edit Lines  topic 
for  more  details  on this),  before LotStat 
starts  making draws.

If  you select  an existing  LotStat file,  its 
settings  are  used,   and  LotStat  starts 
making further draws immediately.
#end


** Display

LotStat's main display shows:

    * the current draw number
    * the current draw (6 nos. + bonus) 
    * your chosen lines plus the number 
        of matches on each line; the matching  
        numbers are highlit
    * the total number of each prize-winning 
        match, and its first and last occurrences. 

By default, the display is continuously updated 
as draws are made,  until a significant match or 
number of draws is reached. Users can set the
"display between pauses"  flag to No;  then the
display is  only  updated when  a key is pressed 
or  a significant event  is reached.

The Psion  status  window  is  not  available 
(except  via  Psion-Menu).


** Menus

The three main menus are:
    * File     -   New, Open, Save As, Save
    * Edit     -   Lines, Options, Font
    * Special  -   Pause, Exit, Exit No Save 


** File operations

New      (Psion-N)  -  create new LotStat file.  
                       counts and lines reset
                       (but not options or font). 
Open     (Psion-O)  -  open an existing file.
                       counts, lines, options 
                       and font are replaced.
Save As  (Psion-A)  -  save as new file.
Save     (Psion-S)  -  save to current file.

A LotStat file records:
    * the number of draws made
    * the lines (including random-choice)
    * the match stats
    * options and font settings


** Editing Lines

To edit  the contents  and number  of lines, 
use  Edit/Lines  (Psion-E).

Each line  is presented  as a  separate  dialog. 
Enter  1-49  for each  number,  or  0  to  have 
that number chosen at random for each draw.

The  last entry  in the  dialog  indicates  the 
action  to  be  taken  on  hitting  Enter:  the 
default  is usually  to go on  to edit the next 
line,  but you can  change this (depending on 
the situation)  to:

    * Edit  previous line
    * Make this line  last  (i.e. forget/unset 
        any  following lines)
    * End  (i.e. stop editing  lines)
    
Note:  cancelling an  edit line  dialog  only 
aborts the edit of that line; any previously- 
edited  lines are not  reverted.


** Options

Use  Edit/Options  (Psion-Q)  to change: 

Beep on  <match event>
      Produces  a sequence  of  beeps when 
      the specified event or higher  occurs. 
      The  number  of beeps  increases with 
      the  number  of matches.
  (A <match event> includes: match 3, 
      match 4,..., jackpot, as well as
      the non-event Never.)
Pause on  <match event>
      Stops doing draws when the specified 
      event or  higher  occurs.
Pause every Nth draw <number>
      Stops  at  draw number  N,  2N,  ... 
      0 means  "never"
Beep  on Nth draw  pause?  <yes/no> 
      Beep  when  an Nth draw  pause happens. 
Display  between  pauses?  <yes/no>
      If set to No, draws continue to be made, 
      but  the  display  is  not  updated  until 
      either the user presses a key (including 
      keys  assigned to actions)  or  a  pause- 
      -worthy event is reached. LotStat runs 
      faster  with this flag  set to  No.
   
The  default  settings  are chosen  to suit 
the initial stages of a run: beep and pause 
on 3-matches,  pause every 50 draws (but 
don't beep),  and display  between  pauses. 

For  a more  involved run,  perhaps in  the 
background during other tasks, it would be 
better to (say)  beep on 4-match, pause on 
5-match, never pause at draw N (or choose 
a large N),  and turn off  display updates. 


** Font selection

Edit/Font (Psion-F) can be used to change 
the display font (name and style attributes). 

This  affects  the  entire  display. As the
windows aren't resized, it's really rather
redundant. Still, if you have a passion for
Swiss rather than Roman font...


** Special / Misc

Pause  (Psion-P)  pauses LotStat until another 
key  is  pressed.

Exit (Psion-X) saves the current file and quits. 

Exit, no save (Shift-Psion-X) quits without 
saving the current file.


** Known Shortcomings

-  Probably  the  slowest  lottery  program! 
-  Choosing  (OPL)  random numbers for both 
    the  draw and  the lines  close  together 
    probably  significantly decreases  the 
    chances  of  winning!
-  No  attempt made  to calculate  spend or 
    expected  winnings.
-  No status window
-  Opening  a file which has  display turned 
    off  can produce an  odd-looking display 
    (possible work-around:  turn display on, 
    then  off again.)
-  LotStat  now does  pretty much  what  I 
    (once!)  wanted,  so is unlikely to change. 
    (I did a lot of work on a very non-standard 
    "2-D"  method for editing  the lines,  but 
    never quite got there. Maybe in some other 
    app...)
-  Perhaps  the best thing about  LotStat  is 
    the icon!


** Author

LotStat  is copyright  Brian Ritchie
(b.ritchie@rl.ac.uk)  1996

LotStat  was started in '95 as my first 
experiment in developing a Psion app in OPL. 
More recently,  I realised that if I wanted to 
release it, I'd have to improve the line-editing
interface  beyond what I tolerated,  and  add
some help info.

Usual "not-my-fault-guv"  disclaimer applies; 
I  doubt that  LotStat  is capable of  reducing
your  quality  of life  significantly,  but if  it 
does,  I  refuse to  be held  responsible!


** Version history

  0.x         95/96   Numerous  versions
  1.0   09 Aug 1996   First  public release  

