/-----------------------------------\
|             "Noughts"             |
|         Desktop amusement         |
|      Chris Bazley, 1998-2003     |
| Version 1.67 (6th September 2003) |
\-----------------------------------/
N.B. This text is best viewed at a display width of 77 columns.
     For an index, do a 'List Of Found' search in your text editor for ">>".

------------------------------------------------------
>> Noughts

  A computer version of the game Noughts and Crosses which runs in the RISC
OS desktop. It allows you to play against computer opponents or other
people, and will keep track of the score.

------------------------------------------------------
>> The Rules of Noughts and Crosses

  Ticktacktoe, or NAUGHTS AND CROSSES, game in which a cross of four lines
is drawn, and, in the spaces so formed, one player marks X's and another O's
alternately. The first player to achieve a row (vertical, horizontal, or
diagonal) of three of his symbols is the winner.
The first player has a slight advantage, but contests generally end in draws
once players become familiar with the game.

(Encyclopaedia Britannica)

------------------------------------------------------
>> Getting started

  Click SELECT on the iconbar icon. The main playing window will be
displayed, and at the top a message will show whose move it is.

  The computer version of Noughts and Crosses is played in much the same way
as the paper and pencil version, except that instead of marking your symbol
on the paper, you point at the space where you want to put your symbol and
click the SELECT mouse button.

  You can also play using keyboard controls.

  You can play the game against another human, or against computer opponents
of variable ability. To set up the player options, open the Choices window
from the menu. If you like, you can even make the computer play itself.

  When a game is won or drawn, click SELECT on the main window to start a
new game. If 'Continuous play' is selected in the Choices window, then a new
game will be started automatically.

------------------------------------------------------
>> Keyboard controls

  There are a number of defined key shortcuts for playing Noughts. Clicking
over the main game window will cause it to gain the keyboard input focus.

On your move -

  The keys 1-9 on the numeric keypad correspond to the spaces in the grid:
Pressing 'Keypad 7' will place your symbol in the top left square of the
grid. Pressing 'Keypad 3' will place your symbol in the bottom right square.
'Escape' will abort the current game and start a new one.

General keys -

Press 'Enter' or 'Escape' when a game is complete to start a new one.
Press 'F1' to open the game manual.
Press 'Ctrl-F2' to close the game window.

Choices window -

Press 'Escape' to cancel changes and close window.
Press 'Enter' to confirm new settings and close window.

------------------------------------------------------
>> The Scores

  Selecting 'Show scores' from either menu displays the current scores in a
window. The scores window can also be brought up by clicking with ADJUST on
the iconbar icon.

  To reset the scores of both players to 0, click on the 'Reset' button in
the scores window. The score counters are also reset if the player names are
changed, or if the control of a player is switched. (This is the reverse of
the behaviour of versions of 'Noughts' prior to 150.)

------------------------------------------------------
>> Configuring Noughts

  Selecting 'Choices...' from either menu brings up a dialogue window from
which you can change the player details and configuration. The options are
divided logically into pages, which may be selected using the radio buttons
on the right of the window.

Player details:

  Select whether you want this player to be a human or computer-controlled
player using the two radio buttons.

 If the 'Human' option is selected, a name for the player can be entered
  in the writable field opposite.
 If the 'Computer' option is selected, the five radio buttons to the
  right determine the intelligence of the computer player.

  If the details of one or other player are altered then the program will
assume that a new tournament has started, and reset the scores of both
players to zero.

Game options:

  The 'Fast play' option will make the computer players react as fast as
possible, with no pause before they make their move.

  Selecting 'Continuous play' will start a new game automatically if the
previous game is finished. In conjuction with the 'Fast Play' option, this
can be useful for rapidly producing statistics on the relative abilities of
the computer players.

  You can control how wordy interactive help messages are using the 'Verbose
interactive help' option.

  The two symbols at the bottom of this page indicate which player will use
which marker (nought or cross). Clicking on 'Swap symbols' will cause the
players' markers to be swapped over.

Action buttons:

 The 'Cancel' button (or 'Escape') closes the window and cancels any
  changes made.
 The 'Set' button (or 'Enter') brings the currently selected choices into
  effect and closes the window.

  Clicking with ADJUST instead of SELECT on either of these buttons keeps
the window open.

------------------------------------------------------
>> Saving and loading configuration

  Select 'Choices...'->'Save' from the iconbar menu to save the current
settings. Note that this saves the settings that are actually in use - which
is NOT necessarily the same as those currently displayed by the 'Configure
Noughts' dialogue, if it is open. A configuration file will be stored in
Choices:Noughts on a machine with a new-style !Boot application (allowing
the game to be run from non-writeable media), or alternatively inside the
!Noughts application.

  Saved configuration can be loaded using the 'Choices...'->'Load' menu
option, which will be greyed out if no user choices have been saved. Any
user configuration file is loaded automatically upon starting the
application.

  Select 'Choices...'->'Default' to restore all settings to their default
state. Doing this is a non-permanent action which does not affect any user
configuration that has been saved.

  Again, remember that the 'Configure Noughts' dialogue displays a 'soft'
copy of the program's settings, and its appearance will not be affected by
loading user or default settings.

------------------------------------------------------
>> Computer player intelligence

  Noughts provides a variety of computer opponents who you can play against,
or you can watch them play them against each other. The five radio buttons
in the Choices window allow you to select different levels of intelligence
for computer players.

  'Vegetable': The computer is completely and utterly stupid. If it
   manages to block you it is complete coincidence, and if you can't beat it
   then maybe you should read the <rules> of the game!

  'Fairly stupid': It is quite likely that the computer will fail to spot
   any positions that it needs to block or rows that it could win by
   completing. Not very clever really.

  'Not bad': This is the default skill level for the computer opponent
   when the program is first loaded. It is pretty unlikely that the computer
   will fail to notice any positions that it needs to block or winning
   possibilities, but it can happen.

  'Quite good': When playing at this skill level, the computer is easily
   capable of beating me if I'm not concentrating! It never misses anything,
   but you can trap it into losing.

  'Cyborg': The computer AI will look many moves ahead, and attempt to
   plan traps for you. Not only this, but it will attempt to foil your
   traps. Beware!

------------------------------------------------------
>> Getting help

  There are two types of help available; interactive help and this help
document.

  The help document will be opened as a hypertext manual if you have Guttorm
Vik's excellent freeware StrongHelp manual viewer. If StrongHelp is not
detected, then a text version of the manual is also available.

  Interactive help is available on all windows/icons/menus in the
application. To make use of this facility you need to load Acorn's Help,
Bubble Help, Explain or a similar program which can display help messages.
When you move the mouse pointer over windows, icons, and menu options, text
explaining their purpose should be displayed.

------------------------------------------------------
>> History of Noughts

  I'm not one of those people who keeps a history file of the development of
a program before I consider it finished. (Mainly because I don't think it is
very interesting, and I never remember anyway...) This list of revisions,
therefore, shows changes since the first version that I considered finished.

Version 1.00, 29/3/98
   The first version I thought was finished.

Version 1.01, 11/5/98
   A very late bug fixed that caused a crash when you clicked on 'Cancel' in
    the options window without previously clicking 'OK' or 'Save'.

Version 1.02, 26/6/98
   Modified the !Run file to 'Iconsprites' the !Sprites file so that the
    sprites are loaded if the game is loaded without being 'seen' (i.e. from
    an application launcher).

Version 1.03, 7/7/98
   Changed some of the sprites slightly, and added small versions of the
    application sprite. This was because the normal sprite looked terrible
    when 'scaled' by the OS.

Version 1.04, 27/8/98
   Got rid of the old application sprite and iconised window sprite, as I
    decided that they looked too spidery. Replaced them with chunkier
    versions.
   Also modified program to avoid crash with error when !Help not found, and
    improved !Help detection.

Version 1.05, 29/9/98
   Now detects !Explain as well as Acorn's !Help.

Version 1.06, 13/2/99
   Added 'Fast Play' option to allow the computer to play itself
    continuously at maximum speed.
   Removed all interactive help launching bits 'cos it was too complicated
    and kept causing crashes. Rewrote and reorganised large chunks of manual.

Version 1.50, 28/10/00
   Added 'Cyborg' to computer's levels of playing ability.
   Finally got around to reorganising Choices window - it isn't big and
    sprawling any more.
   Scores are now reset if players change.
   Support for international resources added, with all program text removed
     to messages file.
   Program configuration now stored in <Choices$Write> if available.
   Separated function of 'Fast Play' option into 'Continuous Play' and 'Fast
    Play by Computer Players'.
   Added 'Verbose Help' option, to control help messages.
   Implemented keyboard controls.

Version 1.51, 27th May 2002
   Much reduced processor usage by using Wimp_PollIdle rather than Wimp_Poll
    for all time-delayed events, and masking out null polls entirely for the
    rest of the time.
   Now has a private sprite area to avoid unnecessarily polluting the Wimp
    sprite pool. New-style iconised window sprite for RO4.
   Made many variables LOCAL that ought to have always been.
   Now reads configuration from Choices$Path rather than (erroneously) from
    Choices$Write.
   !RunImage now compressed (but source supplied), allowing Wimpslot to be
    reduced from 56k to 32k.

Version 1.52, 28th May 2002
   Fixed minor bug affecting which player starts a game that is restarted
    due to changes in the Configure dialogue.

Version 1.60, 09th January 2003
   Moved 'Help' option to top of iconbar menu, in line with latest advice
    from Castle Technology.
   Added 'Choices' submenu, with new options to allow user choices to be
    saved or reloaded, and an option to restore default options. This gives
    the user greater control - previously choices were saved whenever you
    clicked 'Set' in the 'Configure' dialogue, and could not be reloaded.
   As the result of the above change the 'Default' button has been removed
    from the 'Configure' dialogue. The former action of this button (a 'soft'
    set up of the dialogue box that required user confirmation) no longer
    exists.
   Expanded my uses of the single ellipsis character, since this doesn't
    seem to be present in all desktop fonts.

Version 1.61 (25th February 2003)
   Moved edit choices action from submenu back to main menu.

Version 1.62 (19th March 2003)
   Changed the text and action of the 'New game' entry on the iconbar menu
    to 'Show game' (analogous to 'Show scores').
   Added a separate pop-up menu for the game window, which allows an
    appropriate subset of actions possible from the iconbar menu.
   Added Ctrl-F2 keyboard shortcut.

Version 1.63 (21st March 2003)
   Fixed bug introduced in v1.60 where forcibly resetting the
  'Human'/'Computer' radio buttons could cause both to be set simultaneously.

Version 1.64 (13th April 2003)
   Increased Wimpslot to combat the recent appearance of 'No room' errors.

Version 1.65 (20th April 2003)
   Fixed flickering of pane in Choices dialogue box on RISC OS 3.1.
   Removed poncy attempt at providing interactive help on greyed out icons
    by underlaying them with invisible ones. It was no longer working
    properly anyway.

Version 1.66 (27th June 2003)
   Integrates much better with the pinboard - any iconised window icon is
    removed when that window is re-opened independently by the application.
   Fixed bug where the input focus was forced to the configure dbox/main
    window whenever a Wimp_OpenWindow event was received for that window
    (e.g. just dragging them around would do it).

Version 1.67 (6th September 2003)
   Now uses OS_File 18 instead of *SetType and OS_File 8 instead of *CDir.
   Menu builder now copes automatically with strings (from messages file)
    that are greater than 12 charactes in length.
   Added 'F1' key shortcut hint to the game window menu.
   Clicking ADJUST on the game window no longer duplicates the functionality
    of SELECT (as per the Style Guide).
   Formatted the manual text for a fixed-width 77 column display (Zap's
    default).

  This manual used to have a 'future improvements' section, but I removed it
because I seem to have implemented all of them! (aren't I smug?)

------------------------------------------------------
>> General Thanks

  Lee Calcraft and Alan Wrigley for writing 'Wimp Programming for All',
without which I wouldn't have got anywhere.

  Guttorm Vik for writing StrongED, the excellent text editor I used for
writing this program (I haven't tried Zap, but I think StrongED deserves
some praise for a change!) and the StrongHelp SWI manuals, which I also
found very useful.

  My sister Harriet for lending me the money to buy a Risc PC, general
advice about the program, and for lending me 'Wimp Programming for All' for
long periods of time.

  My father for general help and advice with the program.

  Acorn Computers for making the best computers, without which I would
never started programming (remember the Electron, anyone?)...

  Eddie Edwards and R-Comp Interactive for the Acorn port of Doom (the
greatest game ever) without which I wouldn't have wasted large amounts of
time not writing this program...

  Maarten Ottens for sending me the e-mail that inspired me to improve the
AI and release this new version. Kevin Smith for helping with the new AI for
Noughts and Crosses during boring lectures.

  Olaf Krumnow and Herbert zur Nedden of the German Archimedes Group for
writing the ResFind program I use to find the correct resources for
different languages.

------------------------------------------------------
>> Licence and Disclaimer

  Noughts is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public Licence as published by the Free
Software Foundation; either version 2 of the Licence, or (at your option)
any later version.

  This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public Licence for
more details.

  You should have received a copy of the GNU General Public Licence along
with this program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.

  If you did not receive source code with Noughts then you can download
it from http://kingfishercorner.eu

  The application name "Noughts" (including associated sprites/system
variables) has been officially registered with RISCOS Ltd.

------------------------------------------------------
>> Credits

  Noughts was designed and programmed by Chris Bazley.

  Olaf Krumnow and Herbert zur Nedden of the German Archimedes Group wrote
the ResFind program that is used to find the correct Help text for different
languages.

------------------------------------------------------
>> Contacting the author

  Chris Bazley,
  144 Merton Hall Road,
  Wimbledon,
  London,
  SW19 3PZ.
  England.

  E-mail: mailto:cs99cjb@gmail.com
Web site: http://kingfishercorner.eu

