home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / c / cbs / CSB / !CSB next >
Encoding:
Text File  |  1996-04-10  |  14.4 KB  |  249 lines

  1. CSB: Cricket Scorebook; a powerful cricket scoring & stats program.
  2.  
  3. Please see Readme file for license conditions.
  4.  
  5. ### Introduction ############################################################
  6.  
  7.    CSB is a replacement for the standard paper-and-pencil scorebook. It has
  8. the advantage over this type of scorebook that it keeps track of both teams,
  9. can provide instant, detailed statistics, and doesn't make mistakes when runs
  10. and wickets start flowing fast.
  11.  
  12.    I wrote CSB after scoring for a cricket team for a season and discovering
  13. that scoring is intricate and time-consuming work. I decided to write a
  14. program that would do all the work from a minimal human input, leaving me
  15. more time to watch the cricket. As the program grew in complexity, I added a
  16. statistics section and separated out the part of the program dealing with
  17. team creation.
  18.  
  19. ### Please Note #############################################################
  20.  
  21.    CSB needs RISC OS 3.10 or above. To look nice, it needs 3D interface
  22. sprites (bumper arrows that slab, round radio icons, tick-y option icons and
  23. especially those nice 'gright', 'pgright' menu button icons). CSB will grab
  24. memory as it requires it; running without the Laws loaded uses 208k. 
  25.  
  26. ### Basic Usage #############################################################
  27.  
  28.    To use CSB, you will first need to create two teams using the !MakeTeam
  29. software, discussed elsewhere. Run CSB and click on its icon to display the
  30. setup window. Drag the team files to the icons at the top of the window. You
  31. can enter details of umpires and so on if you wish; you can change these
  32. later if you wish (note that you CANNOT change the 'toss won by' field).
  33. Select the match type you require and click OK.
  34.  
  35.    The 'Start innings' window will appear; this will return at (guess) the
  36. start of each innings. You need to fill in all three fields using the menu
  37. icons - note that you will not be able to select the team to bat if it is
  38. obvious. When you click OK, the timers will start, so only do this as the
  39. batsmen step onto the field (if you want to be really accurate).
  40.  
  41.    The 'Ball by ball' window will appear; this is CSB's main window. The name
  42. of the facing batsman is shown; click 'Swap' to force the batsmen to change
  43. ends. This is a completely 'free' operation, used for example when the
  44. batsmen cross before one of them is caught.
  45.    Below the batsman's name is the bowler of the current over; use the menu
  46. icon under the 'Swap' button to choose this.
  47.    Below the bowler's name is a writable icon. This is where you record each
  48. delivery using a system of ball codes; click the window's toggle size icon to
  49. see a list. So, for a 'dot ball' (ie. nothing happens) just press return, or
  50. click 'OK'. You will see that 'Over 1 ball 1' has become 'Over 1 ball 2'. So,
  51. to record some runs, just type the number scored & press return (or click
  52. 'OK'). For extras, enter  'n', 'x', 'b', or 'l' as appropriate and then the
  53. number. If you make a mistake, see 'The Editor' below.
  54.    A simple character typed on its own (eg. 'l') will be interpreted as one
  55. extra (eg. 1 leg bye), EXCEPT FOR no-balls: 'n' means simply that, a no-ball.
  56. 'n1' is different - the striker gets credit & the batsmen swap ends. Think
  57. about it.
  58.    To the right of the 'OK' button is a clump of three buttons. 'Draw' and
  59. 'Declaration' are pretty straight-forward, but 'Halt' is possibly worthy of
  60. comment. A click here will change the text displayed to 'Start', and pause
  61. the timers (batsmen minutes at crease, innings length, partnership length &
  62. so on). This is for tea intervals, drinks breaks, nights in 2+ day matches
  63. and so on. Click again to restart. 
  64.    I haven't mentioned wickets yet; here we go. If a wicket falls or a
  65. batsman retires, type 'w', irespective of which batter is out and of any runs
  66. scored. The 'Batsman dismissed' window is displayed. Choose how the batsman
  67. was out and, if necessary, /which/ batsman was out. If the batsman was run
  68. out and runs were completed beforehand, type the number in the icon next to
  69. the 'Run out' radio icon. If runs were completed before another type of
  70. dismissal, see 'The Editor' below. You may enter a comment on the dismissal
  71. if you wish; select the next batsman if there is one and click 'OK'.
  72.    If a batter retires, you need to choose the 'retired hurt' option (under
  73. 'other') and use the Editor to change his 'how out' to 'retired hurt, out'.
  74.    If you click on a code in the 'Ball codes' box, the letter will be entered
  75. in the writable - try it and see.
  76.  
  77. ### The File Submenu ########################################################
  78.  
  79.    Clicking MENU on the 'Ball by ball' window opens the CSB main menu.
  80. Opening the 'File' submenu enables you to access a standard save box, a
  81. standard(-ish) fileinfo window and the print menu. CSB can produce two types
  82. of printout: a match summary and an innings summary. You need to have run
  83. !Printers to print from CSB.
  84.  
  85. ### The Match Submenu #######################################################
  86.  
  87.    The 'Match' submenu contains five entries (one shaded) which mimic the
  88. buttons in the main window, and another entry below a dotted line which opens
  89. the CSB editor - see later.
  90.  
  91. ### Extra Features - Clocks & Scoreboards ###################################
  92.  
  93.    Examination of the 'Scoreboards' & 'Timing' submenus will reveal four
  94. entries, each of which opens a window. These can be toggled from the keyboard
  95. ('^' means CTRL) or using the menus. The clock and small scoreboard can be
  96. moved around by dragging them; if you drag the timer display it will move.
  97. The timer is included for fun - I'm not sure what you could use this for
  98. (possibly time off field). Click the green button to start the timer (hours
  99. and minutes - cricket's a slow game!), the red to halt it and the 'oo:oo'
  100. button to reset.
  101.  
  102. ### Extra Features - Miscellaneous ##########################################
  103.  
  104.    Choosing 'Quick entry' from the main menu or pressing CTRL-Q will toggle
  105. the 'Quick entry' window (where do I get these names from). Click a number to
  106. enter it as a ball code. The window can be moved around by dragging the small
  107. icon above the '1' & '2' buttons. Using this in combination with the 'Ball
  108. codes' box can eliminate the keyboard altogether (eg. click on "z wides : xz"
  109. and then '2' to enter the code 'x2' - two wides run).
  110.  
  111.    In some (most) forms of cricket, a certain number of overs need to be
  112. bowled in the last hour; after these expire the match ends. If a result has
  113. not been reached, the match is drawn. To impose such an overs limit, open the
  114. 'Countdown' submenu from the main menu and type in the limit. This number
  115. INCLUDES the current over - you can check this from the large scoreboard.
  116.  
  117. ### Statistics & Comments ###################################################
  118.  
  119.    Following 'Statistics' from the main or iconbar menus leads to the
  120. Statistics submenu (duh...). Choosing one of the first three options opens a
  121. statistics window (double duh...). From the top:
  122.    The 'Match' option reveals the 'Match Information' (eh?) window containing
  123. match info (toss, umpires etc.), the result (if available), and a
  124. fall-of-wicket table. Click 'Partnerships' to display a nice bar chart of
  125. partnerships (not shaded like the BBC's one though). 'Print' prints a match
  126. summary. Click MENU to choose the innings whose stats are being displayed.
  127.    The 'Batting' option reveals a batting summary. Click 'Print' to print the
  128. innings, or MENU to choose the innings whose stats are being displayed. Any
  129. 'not out's are displayed in red. Click on a player's name to display a player
  130. batting summary, both for the match & previous career.
  131.    The 'Bowling' option reveals a bowling summary. Click 'Print' to print the
  132. innings, or MENU to choose the innings whose stats are being displayed. Click
  133. on a player's name to display a player bowling summary, both for the match &
  134. previous career. Note that if more than seven bowlers are used, their names
  135. will not be displayed. This will change when I alter the window from using
  136. loads of icons to a non-auto redrawn one.
  137.  
  138.    The fourth entry on the 'Statistics' submenu leads to the 'Comments'
  139. submenu. Click 'Display' to open the 'Comments' window. This is where CSB
  140. will record momentous events (batsmen's 50s, the first boundary of the
  141. innings and so on). You can also add comments; just type them in a text
  142. editor (eg. Edit, Zap) and save the file onto the comments window. You can
  143. save off all the comments (eg. for editing) from the 'Save' option on the
  144. 'Comments' menu (or shift-f3).
  145.  
  146. ### The Editor ##############################################################
  147.  
  148.    Open the 'Editor' window from the match submenu, choose 'Edit' from the
  149. iconbar menu, or press ^E or f5. This dialogue box is complex and can do
  150. dangerous things. It can be used to correct errors (on your part or that of
  151. CSB), deal with unusual situations, or enter a [partial] record of a match.
  152.  
  153.    To do some Editing, first choose the innings you wish to edit with the
  154. top row of radio icons. You cannot edit an innings that hasn't started or
  155. doesn't exist. Then choose the area of play you wish to alter.
  156.    'Batting' & 'Bowling' enable you to change, for example, the number of
  157. runs scored / balls faced / overs bowled / no-balls bowled (etc.) by a player
  158. - pick the player in question using the menu icon.
  159.    'Score' enables you to alter the score breakdown for the innings and the
  160. score at which the last wicket fell IN THE PRESENT INNINGS.
  161.    Choosing 'FoWs' enables you to alter the partnerships-cum-fall of wickets
  162. in the innings. Here, 'bat no.'s refer to batting order (as you'd expect).
  163.    'Match' is simple - you can alter the names of the umpires, scorers and so
  164. on. 'match title' should be something like '6th Cornhill Test'.
  165.    'Innings' contains data such as total overs bowled and wickets down. The
  166. 'facing batsman' entry IS NOT the batting order. Use the menu button to
  167. choose the batsman who you want to be facing; this will enter the correct
  168. number in the icon. The bottom writable here, 'change innings now' is really
  169. an option button. If you enter a number here, the current innings will end
  170. when you click 'OK'.
  171.    When you've finished editing an area, click an 'OK' button. The one inside
  172. the box will update CSB's internals, while the outside one will do this and
  173. then close the Editor.
  174.  
  175.    For more information on the Editor, several worked examples (I sound like
  176. my Advanced Mechanics textbook) and just WHY you need a 'change innings now'
  177. button, see the 'Editor' file in this directory.
  178.  
  179. ### The Laws ################################################################
  180.  
  181. **********
  182.           Laws not included in this release due to MCC regulations
  183.                                                                   ***********
  184.  
  185. ### The Options Window ######################################################
  186.  
  187.    Choose 'Options' from the iconbar menu to open this window (you probably
  188. already have - I know it's the first thing I do when I get a new program).
  189.    The options are split into five sections and are really self-explanatory
  190. (like most of the program too, I reckon). 'Default match details'
  191. (surprisingly) has nothing whatsoever to do with lost balls. Note that values
  192. supplied here are just defaults; they can be changed. When the first innings
  193. of a new match commences, or a new match is loaded into CSB, CSB is able to
  194. open certain support windows (because everything works on toggles, if they're
  195. open they'll be (unhelpfully) closed again) - you can choose these here.
  196.    When you load some comments (ie. drop a &fff file onto the comments
  197. window), CSB will either c-c-c-concatenate them, replace them, or leave the
  198. decision up to you. You can choose this here. CSB will occasionally make a
  199. comment; choose which you require here. Note that although partnership
  200. minutes and balls are kept track of (see the 'Partnerships' window), they are
  201. not present in the comment (due to a technical hitch. I forgot).
  202.    The final area - Miscellaneous - contains five options. From the top:
  203.    Time check on startup - if ticked, CSB will tell you what time it thinks
  204. it is when it is first loaded (good word, it, eh?).
  205.    Use 8-ball ove.... - if the 'overs bowled' field in the players' careers
  206. refers to 8-ball overs tick this box or the strike rates given will be wrong.
  207.    Update team files - if ticked, when the match (or is it innings? I forget)
  208. is complete, the statistics for the match will be added on to the career
  209. stats (just checked, it is innings) ie. normally tick this!
  210.    Add comments to printout - if this is ticked, the comments will be added
  211. to the foot of any 'Match summaries' output. If you have a lot of comments in
  212. a 2-innings match, they may get cut in half. This is 'cos I don't have the
  213. PRMs, so have worked out how to print in a very basic & haphazard way.
  214.    Automatically load Laws - The Laws take up quite a lot of memory. If this
  215. option is NOT ticked, they will only be loaded & decompressed when required
  216. (ie. you choose something from the 'Laws' submenu). If it /is/, they will be
  217. loaded on initialisation.
  218.  
  219.    Click 'Default' to set the default options, 'Save' to set and save the
  220. current options, 'Cancel' to undo any option changes & close the window, 'OK'
  221. to set the options & close the window. The options are recorded in the file
  222. 'Options' (did you guess?) in the !CSB app. directory. Please delete this
  223. file (The 'Options' one, not /this/ this file!) before passing on the
  224. application.
  225.  
  226. ### Limitations #############################################################
  227.  
  228.    Damn - I wanted to say 'None' here, but I can't quite yet. In one-day
  229. games, if a result cannot be reached for some reason (rain, tie), the result
  230. is worked out from (eg.) a score comparison after (say) 20 overs. The problem
  231. with CSB is that you can't edit the actual match result.
  232.    If you get to the end of an innings, nine wickets fallen & one man retired
  233. hurt, to end the innings you need to put the retiree in (even if he doesn't
  234. bat again), and use the "Editor->Innings->Change innings now" option. Ok, it
  235. works but it could be better.
  236.    Partnership comments could be better.
  237.    Toss cannot be changed.
  238.    Also, CSB has been known to crash with an error of 'Uncaught trap: No
  239. stack for trap handler' when requested to display some statistics. This
  240. happens very rarely, completely unpredictably, and usually at the most
  241. annoying time possible. You have been warned.
  242.    The tick for the 'Quick Entry' menu option can appear by the 'Timing' menu
  243. option.
  244.  
  245. ### Final Bit ###############################################################
  246.  
  247.    I welcome any feedback - my addresses are at the bottom of the Readme file
  248. in the same directory as this file.
  249.    !CSB was written by John Fairhurst using DeskLib.