==============
GamesPack v1.1
==============

This package contains a collection of simple games using a VGA mode
(640x480x16) and (optionally, but highly recommended) a mouse.


------------
Requirements
------------
* svgalib (tested with version 1.21).
  Some distributions (e.g. slackware) have separated the svgalib
  shared libraries from the rest of the distribution.  In these cases,
  ensure that both packages are installed.

------------
Installation
------------
* Edit the Makefile, setting/changing USEMOUSEFUNCS, NOMOUSE,
  MOUSEDEFAULTRATE, BINDIR, LIBDIR and PREFIX, if necessary.
  - USEMOUSEFUNCS should be set to use the mouse_ functions, rather than
    vga_setmousesupport().  This allows console switching for svgalib
    versions earlier than 1.20.  If problems are encountered with
    console switching, undefine this.  You should not need to define
    it if you are using svgalib 1.20 or later.
  - NOMOUSE removes mouse support
  - MOUSEDEFAULTRATE changes the mouse sampling rate from the default, if
    USEMOUSEFUNCS is also defined.
  - The PREFIX is to avoid clashes with other programs with the same
    name.  I suggest using vga_ or nothing as the prefix.
* Type 'make'.
* As root, type 'make install'.

------
Thanks
------
* Keith Pomakis <kppomaki@jeeves.uwaterloo.ca> for writing the
  Connect-4 algorithm and putting it into the public domain.  See the
  directory c4 for more information.
* Bennett Todd <bet@std.sbi.com> for writing the Othello algorithm and
  posting it to alt.sources.  See the directory othello for more
  information.
* Harm Hanemaayer <hhanemaa@cs.ruu.nl>,
  Michael Weller <eowmob@exp-math.uni-essen.de>,
  and other contributors for svgalib.
* Rob Malouf <malouf@csli.stanford.edu> for (unknowingly) contributing
  the font from dvgt (a very nice svgalib dvi viewer).
* Adam Jenkins <apj@twain.oit.umass.edu> for reporting the keyboard
  checking bug in connectN.
* Laszlo <root@light-house.gts.org> for reporting the mouse pointer
  display bug and suggesting I use less CPU time.
* Thomas Roettgers <tom@bangor.franken.de> for prompting the
  improvement in the mines losing end of game scenario, to provide
  more information.

-----
Notes
-----
* In addition to the mouse, there are keyboard shortcuts for the grey
  buttons presented on the right of the screen: n for New Game, q for Quit.
  The cursor keys will move the pointer and the return key performs the
  same function as the mouse button.  These allow you to play, even if you
  don't have a mouse.  As a bonus, the interrupt character (often ^C) also
  works.
* Console switching is enabled using the usual mechanism (Alt-Fn) if
  the programs were compiled with either USEMOUSEFUNCS or NOMOUSE
  defined, or if svgalib 1.20 or later is used.

----------
Known Bugs
----------
* None.  8-)

----------------------
Potential Improvements
----------------------
The following will invalidate compatibility with older versions of
svgalib:
* Use vga_getpixel() instead of vga16mem in vga16.c (when
  vga_getpixel() works, it doesn't seem to in svgalib 1.21).
* Investigate keyboard_ functions so we can use select() rather than
  polling the keyboard/mouse (this would require at least svgalib
  1.20, assuming it works).

--------
Feedback
--------
All feedback should be sent to me, Evan Harris, at evan@cs.mu.oz.au.

---------
ChangeLog
---------
1.0	19 Jul 1994	First Linux version completed:
			ConnectN v1.0, Othello v1.0, Mines v1.0
1.1	26 Jan 1995	ConnectN v1.1, Othello v1.1, Mines v1.1

#######################################################################

==========
Game Notes
==========

---------
Connect-N
---------

This is the standard game of Connect-4 with additional parameters to
allow the player to play Connect-3 to Connect-10 on boards varying in
size from 4x3 to 21x19.

The computer player was very well written by Keith Pomakis
<kppomaki@jeeves.uwaterloo.ca>, the interface by myself.  Keith's
original distribution can be found in the subdirectory c4.  It was
used unmodified.

Moves can be made by clicking the left mouse button (or return key)
anywhere in the column you want to put a block in.  If the board width
is less than 10, typing a number from 1 to 9 puts a block in that
column. 

The intelligence of the computer may be set to any number between 1
and 10, the default is 5.  The more intelligent it is (higher
numbers), the longer it takes to make a move.  The board size has a
similar effect.

At the default intelligence on the default board size, it takes an
acceptable period of time to think of its moves (on my 486DX33), at 3
it's really quick, at 10 it takes "forever".  On a 386 you may want
the default to be -i4, on a faster 486, perhaps -i6.  Try them and
find out.

While the computer is thinking, the only button which works is the
quit button.

Some ways of playing the game:

$ vga_connectN 			# Connect-4 on a 7x6 board
$ vga_connectN -i3 -r		# decide moves quickly, reverse player colours
$ vga_connectN -n5 -w9 -h8	# Connect-5 on a 9x8 board
$ vga_connectN -n3 -w5 -h4 -c	# Connect-3 on a 5x4 board, computer starts

I suggest making aliases for your favourite incantations (connect4,
connect5, etc).

ChangeLog:
1.0	 9 Jul 1994	First Linux version completed
1.1	26 Jan 1995	Keyboard checking bug fixed
			Mouse pointer display bug fixed
			Less CPU used waiting for user input

-------
Othello
-------

This is the standard game of Othello.

The computer player was written by Bennett Todd <bet@std.sdi.com>, the
interface by myself.  Bennett's original posting to alt.sources can be
found in the subdirectory othello.  I modified it quite a bit.

Moves can be made by clicking the left mouse button (or return key)
anywhere in the square you want to put a block in.

The depth to which the computer will search may be set to any number
between 1 and 9.  The default is a variable depth, which is 3 for most
of the game.  The more intelligent it is (higher numbers), the longer
it takes to make a move.  There is an upper limit of (around) 30
seconds for a computer move.  At that point, the search is terminated.
Clearly a faster processor will be able to check more positions in the
30 seconds.

While the computer is thinking, the only button which works is the
quit button.

Some ways of playing the game:

$ vga_othello -r		# reverse player colours
$ vga_othello -d5 -c		# computer starts, search depth of 5

ChangeLog:
1.0	19 Jul 1994	First Linux version completed
1.1	26 Jan 1995	Mouse pointer display bug fixed
			Less CPU used waiting for user input

-----
Mines
-----

This is the game of mines, sharing many similarities with the Windows
game of minesweeper, and xmines.

The availability of this game, along with vga_klondike from
vga_cardgames (available separately), makes Windows obsolete.  8-)

Moves can be made by pressing the left mouse button (or return key)
anywhere in the square you want to expose.  If it is a mine, the game
is over.

Pressing the middle mouse button (or both left and right mouse
buttons, for those with two button mice) in a square which is already
exposed will highlight all the squares around it, except those marked
with a flag, if the number of squares around it marked with a flag is
less than the number on the exposed square.  If the number of squares
around it marked with a flag is equal to (or greater than) the number
on the exposed square, the squares not marked with a flag will be
cleared.

Pressing the right mouse button (or space key) on a square will cycle
the mark on the square from nothing, to a flag, to ?, to nothing.  The
? mark does not protect you if you click on the square with the left
mouse button.

Some ways of playing the game:

$ vga_mines				# play on a 20x20 board with 100 mines
$ vga_mines -w 10 -h 10 -d 0.1		# play on a 10x10 board with 10 mines
$ vga_mines -w 8 -h 8 -d 0.16 		# minesweeper "Beginner" board
$ vga_mines -w 16 -h 16 -d 0.16		# minesweeper "Intermediate" board
$ vga_mines -w 30 -h 16 -d 0.207	# xmines, minesweeper "Expert" board

ChangeLog:
1.0	19 Jul 1994	First Linux version completed
1.1	26 Jan 1995	Mouse pointer display bug fixed
			Less CPU used waiting for user input
			Losing end of game display enhanced
