|
Next
Previous
Contents
12. Fourth Example: Hearts
Here is the hoary old game of Hearts, written for UNIX systems by Bob Ankeney sometime in the '80's, revised in 1992 by Mike Yang, and currently maintained by Jonathan Badger. Its predecessor was an even older Pascal program by Don Backus of Oregon Software, later updated by Jeff Hemmerling. Originally intended as a multiplayer client, it also works well in single-player mode against computer opponents. The graphics are nice, though the game lacks sophisticated features and the computer players are not particularly strong. All the same, it seems to be the only decent Hearts game available for UNIX and Linux machines even at this late date. Due to its age and lineage, this package is particularly difficult to build on a Linux system. It requires solving a long and perplexing series of puzzles. It is an exercise in patience and determination. Before beginning, make certain that you have either the
xmkmf make
These are the culprits in the file
In
at line 39. This will bypass the reference to _tty.
make
The include file
to
make
Modern Linux distributions use the terminfo and/or termcap database, rather than the obsolete termlib one. Edit the Line 655:
changes to:
make
The main lesstif library is In line 653:
changes to:
make
Round up the usual suspects. There is no Line 653:
changes to:
(The PEX5 lib comes closest to PW.)
make
The
Installation: As root,
Test run: rehash (We're running the xmhearts
From
From the file
This is a classic case of RTFM.
As root, cd /usr/local/lib mkdir hearts cd !$ Copy the cp /home/username/hearts/heartsd . cp /home/username/hearts/hearts_dist . cp /home/username/hearts/hearts.instr .
Try another test run. xmhearts It works some of the time, but more often than not crashes with a
The "distributor" and "dealer" scan the hardware ports. We should thus suspect that those programs need root user privileges. Try, as root, chmod u+s /usr/local/lib/heartsd chmod u+s /usr/local/lib/hearts_dist (Note that, as previously discussed, suid binaries may create security holes.) xmhearts
It finally works!
Next Previous Contents Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |