DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: R T

⟦d18d429fa⟧ TextFile

    Length: 2976 (0xba0)
    Types: TextFile
    Names: »README«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Sol/README« 

TextFile

I've done some work on "sol.c" to make it portable to more systems than
just BSD.  The only thing that needs to be specified is whether System V
terminfo/curses's termcap emulation is being used; compile with -DTERMINFO if
so. (The Makefile has been modified for this.)  The other conditionals are
based on SIGTSTP (independent of others; some System V's have job control) and
on TCGETA from sys/ioctl.h. With no special compile #define's aside from the
terminfo stuff, sol.c will make itself at home on your system.

I ripped the gettimeofday() calls out of both programs and used localtime()
instead.  It does the job, since the returned value is used only to seed
the random number generator, and it's portable.

I installed a bugfix in the termcap stuff while I was at it; the original
author apparently didn't understand how the "bs" and "bc" attributes work.
I've fixed that so it should work as per termcap(4).

Through the magic of "sdiff" and the fact that "sol" and "solx" are basically
derived from the same original source code, I have made the same changes to
"solx".  Again, they work here.

I haven't tested this under BSD (I don't have a BSD system available to me)
so I may have broken something under BSD.  The game does successfully auto-
configure for System III and System V, and works fine.  (It also uses termio
on these systems, so "echoe" gets reset properly.) Presumably it will work
properly under Xenix 3 and Xenix 5, but I can't test it.

Have fun with "sol" and "solx".

++Brandon

(author's original README included below)
===============================================================================

Sources for two solitaire games - a while back someone posted some sources
in some language or other that played solitaire. With about two evenings
woth of work that became sol.c - standard solitaire. To compile either game
(under BSD4.3) use a command like 'cc -o sol sol.c -ltermcap' or
'cc -o solx solx.c -ltermcap' - you'll have to adjust on Xenix for termcap
etc. etc. etc. solx.c is a different solitaire game, and a lot more
difficult to get out. You start with 1 run containing a single card
(#1 in the game), then hidden piles 2 thru 7, containing 2 thru 7 cards
respectively. The remaining 24 cards are dealt on runs 2 thru 7 - four
in each run. There is no deck - all you can do is to move runs around.
Unlike regular solitaire, runs can be split, hence the altered move
command, and since runs can get a bit long (I've seen them as big as
22-23 cards) I've turned the display on it's side. Both games have several
cheats, and an autopilot, although the autopilot for solx is not very clever.
In order to prevent thrashing of runs I coded it so that it will only move
a run if the top card being moved was not already placed. However there
are times when such an apparently redundant move is necessary to get out.

Best of luck, and have fun.
--
		dg@wrs.UUCP - David Goodenough

					+---+
					| +-+-+
					+-+-+ |
					  +---+