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: T c

⟦0fec6243c⟧ TextFile

    Length: 26844 (0x68dc)
    Types: TextFile
    Names: »cubes.long.6«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Cubes/cubes.long.6« 

TextFile

.TH CUBES.LONG 6 "cubes 5.1" GMP "UNIX Gaming Manual"
.SH NAME
cubes.long \- the nitty-gritty details of the game of cubes
.\"
.\" sccsid: @(#)cubes.long.6 5.1 (G.M. Paris) 89/01/22
.\"
.\"
.\"
.\"	cubes 5.1  Copyright 1988 Gregory M. Paris
.\"		Permission granted to redistribute on a no charge basis.
.\"		All other rights are reserved.
.\"
.\"
.SH SYNOPSIS
.B cubes
[
.BR \- [ F ]{ BS }
] [
.B \-s
] [
.BR \- { pw }
] [
.B \-g graphics
] [
.B \-f cubehist
] [
.B \-h cubehost
] [
.B cubename
]
.SH OVERVIEW
[ Note: This is the long and complicated manual page for
.IR cubes ,
which exists for the purpose of detailing the finer points of the game.
If you are a beginner at
.IR cubes ,
the shorter manual page,
.IR cubes (6),
should be all you need to start playing the game. ]
.PP
The game of
.I cubes
is a computer implementation of a dice game played with
five six-sided dice.
The goal of the game is to be the first player to
score
.I Win Score
points (usually 10,000).
Players take turns rolling the dice in the hopes of getting one or more
of several scoring combinations.
A player can continue rolling as long as the previous roll produced
a scoring combination.
Failing that,
any points accumulated during the turn are lost and the player's turn ends.
Before that happens,
the player may elect to quit rolling (prudently or cowardly),
causing the points accumulated during the turn
to be added to the player's score.
It takes about twenty minutes to play a single 10,000 point game.
Contrary to what you might think by reading this manual page,
.I cubes
is both easy to learn and easy to play.
.SH "BEGINNING A GAME"
.I Cubes
is both a single-player and a multi-player game,
with the game logic implemented in a cube server,
and player interaction via a client process, the
.I cubes
program.
For more than one person to play at a time,
each must each begin
.I cubes
at nearly the same time, and must connect to the same server.
.PP
There are two
.I cubes
game modes:
.I Standard
and
.IR Blitz .
The first corresponds to games played to 10,000 points;
the second to shorter games played to 7,500 points.
Supplying the
.B \-B
or
.B \-S
option informs the server that you'd prefer to play
.I Blitz
mode or
.I Standard
mode games respectively.
The
.B \-FB
.RI ( Force \  Blitz )
or
.B \-FS
.RI ( Force \  Standard )
option informs the server that you will play only
.I Blitz
or
.I Standard
mode games respectively.
Your preference may be taken into account when the server
decides the mode for each game.
If the server does not honor your preference
and if you specified one of the forced preferences,
the server will reject you.
If you do not supply a preference option,
the server assumes you have no preference.
.PP
If
.I cubes
is invoked with the
.B \-s
(spider mode) option,
and if there are no humans already playing,
the program will hang,
waiting for another human to begin a game.
(You may wish to suspend
.I cubes
at this point -- the program will alert you by
ringing your terminal bell when a game is about to begin.)\ 
If you get tired of waiting for another player,
you can quit waiting and begin a game by typing the letter
.RB ` g '
for `go'.
You also can quit waiting with an interrupt,
which will cause
.I cubes
to exit, with no penalty to your ranking.
.PP
When a person enters a game already in progress
(explained more fully below),
.I cubes
will add that person as a watcher.
The watcher can join the game using
.RB ` g '
for `go'.
This step can be skipped by supplying
.RB ` \-p '
switch on the command line, causing
.I cubes
the user to be added as a player, rather than as a watcher.
.PP
If your terminal supports DEC or Zenith graphics mode,
you can tell
.I cubes
to take advantage of the graphics when drawing the screen.
(This feature assumes that the
.RB ` as '
and
.RB ` ae '
termcap capabilities describe how to put your terminal into and take it out of
graphics mode.)\ 
To do this, supply the
.RB ` \-g \  graphics '
option on the command line, where
.B graphics
is one of
.RB ` d '
for DEC graphics,
or
.RB ` z '
for Zenith graphics.
The
.B \-g
option need not be supplied if your terminal's termcap
entry specifies the
.RB ` Cg '
.RI ( C ubes
.IR g raphics)
string capability to be a letter corresponding to
one of the valid graphics types
.RB ( d 
or
.BR z ).
.PP
After each completed game,
.I cubes
appends a single line to the file ``.cubehist'' in
your home directory.
The line provides a summary of what the game did to your
standing with regard to other players of
.IR cubes .
If you wish to change the location of this file,
you may do so with the
.RB ` \-f \  cubehist '
command line option,
or with the
.B CUBEHIST
environment variable.
The command line option overrides the environment variable setting.
To disable the feature entirely, specify a null filename.
.PP
The
.I cubes
program assumes that the server is on the same system as the player.
If this is not so, the
.RB ` \-h \  cubehost '
option can be used to tell
.I cubes
which system the server is running on.
If you normally connect to a server on another system,
you may find it more convenient to set the
.B CUBEHOST
environment variable to that system's name.
(The command line option overrides the environment variable.)
.PP
If you'd like your name during the game
to be something other than your login name,
you can supply a new name on the command line
(multi-word names need not be quoted).
If you have a favorite name,
you can set the environment variable
.B CUBENAME
to that value, which
.I cubes
will use when none is supplied on the command line.
In either case,
.I cubes
will display only the first eighteen characters of the name.
.SH "PLAYING THE GAME"
The rules of the game are described in more depth below.
Fortunately, it is not necessary to understand the rules before playing
.IR cubes ,
since the cube server handles all that for you.
The only thing to know before playing is what to do when prompted.
.PP
The
.I cubes
program will ask you only a few questions.
The first question of each turn is
.PP
.B "	Ready to roll? [yxe]"
.PP
which is asking you to make the first roll of your turn.
The letters
.RB ` yxe '
indicate that the three valid answers are
.RB ` y '
for yes (to roll), and
.RB ` x '
to enter autopilot mode (see
.B AUTOPILOT
below),
.RB ` e '
for exit, to quit the game (see
.B QUITTING EARLY
below).
The default if you type just a carriage return is yes.
.PP
The second question, of the form
.PP
.B "	nnn saved, mmm showing; command? [rkhmabpxe]"
.PP
is asking you whether you want to quit rolling or not,
and if not, which dice you want to roll.
The value of
.B nnn
is the number of points you have from previous rolls.
The value of
.B mmm
is the number of points from the dice you just rolled.
If you hold, the sum of
.B nnn
and
.B mmm
will be added to your score.
To hold, type
.RB ` h '
and a carriage return.
.PP
If you wish to roll again, you can type just a carriage return, and all
nonscoring dice will be rerolled (or all dice, if they've all scored).
If in addition to the nonscoring dice, you wish to roll some of the
scoring dice, you can type
.RB ` r '
followed by the die numbers.
The
.RB ` r '
is default, so you can omit it if you like (and you probably will).
Also, if you omit the dice numbers, only the nonscoring dice will be rolled.
Note that the nonscoring dice always will be rolled,
even if you don't specify them explicitly,
so there's really no point in doing so.
.PP
Sometimes it may be more convenient to tell
.I cubes
which dice you wish to keep rather than which dice you wish to roll.
To do this,
you can type
.RB ` k '
followed by a list of the dice you want to hold back.
If no dice are specified, all scoring dice are kept and only nonscoring
dice are rolled.
.PP
Some players find it advantageous to check the score file
(see
.B THE SCORE FILE
below)
before deciding whether to roll again or to hold.
Four commands are available for this purpose.
They are
.RB ` m '
for my rank,
.RB ` a '
for above me,
.RB ` b '
for below me,
and
.RB ` p < number >'
for player rank.
These commands will cause
.I cubes
to display the score file information for you,
for the player ranked immediately above you,
for the player ranked immediately below you,
or for the selected player in the current game.
.PP
If you are going to be temporarily interrupted,
you might want enter autopilot mode by answering
with
.RB ` x '.
.PP
You also can type
.RB ` e '
in response to this question,
which will get you yet another question
.PP
.B "	Do you really want to quit the game? [ny]"
.PP
the default answer being
.RB ` n '
for no.
You should read the section titled
.B QUITTING EARLY
before you answer
.RB ` y '
to this question.
.PP
At the conclusion of a game,
.I cubes
will prompt with
.PP
.B "	Play another game? [ynmabp]"
.PP
if you played in the last game, or if you were watching
.PP
.B "	Play in next game? [ynmabp]"
.PP
either of which is asking you if you'd like to play in the next game.
There is no default answer to this question because it is too easy
to confuse this prompt with the "Ready to roll?" prompt,
which is answered almost invariably with a carriage return.
The
.RB ` m ',
.RB ` a ',
.RB ` b ',
and
.RB ` p '
commands, as described above, are available for use at this prompt.
.SH "SCORING COMBINATIONS"
The following is a description of each of the
.I cubes
scoring combinations.
Below, the word ``face'' is used as shorthand for face value.
For a one, the face value is ten,
and for a joker (see
.I Joker
below) the face value is thirty.
For all other faces, the face value is the same as the number of spots
on the face, that is, two for a two, three for a three, etc.
.IP Points 12
Description
.IP "300 * face"
.I Five of a Kind
is the only combination that includes previously held dice.
.I Five of a Kind
is all five dice showing the same face.
This combination can occur any time the dice are rolled
(if any held dice are showing the same face).
Since held dice are part of the new combination,
to not be counted twice,
the points for the old combination(s) are forgotten.
All five dice score.
.IP 1500/750
A
.I Straight
is an uninterrupted sequence of
five numbers, either one through five or two through six.
All five dice score.
If previously held dice are used in making a
.IR Straight,
it is worth 750 points.
Otherwise, if all five dice were rolled to produce the
.IR Straight,
it is worth 1500 points.
.IP "200 * face"
.I Four of a Kind
is four rolled dice showing the same face.
This combination can occur only when four or five dice are rolled.
Four dice score.
.IP 400
A
.I Small Straight
is an uninterrupted sequence of four numbers.
The possibilities are one through four, two through five, or three through six.
This combination can occur only when four or five dice are rolled.
Four dice score.
.IP "100 * face"
.I Three of a Kind
is three rolled dice showing the same face.
This combination can occur when three, four, or five dice are rolled.
Three dice score.
.IP 100
Any
.IR One ,
not part of another combination, is a scoring combination unto itself.
A
.I One
can occur at any time.
Each
.I One
is a scoring die.
.IP 50
Any
.IR Five ,
not part of another combination, is a scoring combination unto itself.
A
.I Five
can occur at any time.
Each
.I Five
is a scoring die.
.IP 0
Any
.IR Joker ,
not part of another combination, is a scoring combination unto itself,
but unlike the
.I One
and
.IR Five ,
a single
.I Joker
is not worth any points. 
However, the face value of a
.I Joker
is a whopping thirty, thus making
.IR Three ,
.IR Four ,
and
.I Five of a Kind
in
.I Jokers
worth 3000, 6000, and 9000 points respectively.
.B Note:
not all cube servers will be configured to play
.I cubes
with dice that have
.I Jokers
on them, and even if so configured,
will not play all games with such dice.
If the game is to be played with
.I Joker
dice, you will be notified before the game begins
(or when you enter, if the game is in progress).
You may think of these dice as having thirteen sides,
with two of each of the faces one through six,
and one
.I Joker
face.
.SH "ROLLING THE DICE"
Each turn starts with the player rolling all five dice.
Whenever the dice are rolled, if no scoring combination appears,
the turn is over and any points accumulated during the turn are lost.
If some dice score,
then the player can choose to roll again or to quit rolling.
When the player quits, the points accumulated during the turn are
added to the player's score.
This is the only way to score points.
.PP
When rerolling, all nonscoring dice are always part of the reroll.
If more than one scoring combination occurred on the prior roll,
the player also may choose to reroll some scoring dice,
with the restriction that at least one scoring combination must be held back.
When scoring dice are rerolled,
the points for the combinations they were part of are not added to
the accumulated turn points.
.PP
When all five dice score, either in a single roll or in multiple rolls,
the player may continue rolling with all five dice.
This is the same as beginning the turn afresh,
except that the turn points earned so far are retained (but are still
vulnerable to being lost).
.PP
A player must quit rolling at some time to earn points on the scoreboard,
but there are two times when the player cannot quit.
The first time is when the player has zero points, or in other words,
is not yet on the scoreboard.
The player must score at least 500 points in a turn to get
.I On Board
and cannot quit before earning those points.
Similarly, to get
.IR Off \  Board ,
or cross the
.I Win Score
line, the player needs at least 500 turn points.
This threshold need be matched only when trying to cross
.I Win Score
points;
once beyond, the player can quit with any number of turn points.
.SH "WINNING THE GAME"
A player with
.I Win Score
points or more at the end of a round of
turns is the winner, but only if that player's score exceeds
the next best score by a
.I Win Margin
of 250 points.
While this condition is not met, play continues.
.I Cubes
will warn of a player's impending win.
.PP
Normally, 10,000 points is the
.IR Win \  Score ,
or minimum score, needed to win a game.
On some systems, however, the cube server may be configured
to run in
.I Blitz
mode during some parts of the day (usually working hours),
or when all players with a preference desire to play in
.I Blitz
mode.
(See
.IR cubeserver (6)
for more details.)
In a
.I Blitz
mode game,
.I Win Score
will be less than 10,000 points,
usually 7,500 points (unless changed at compile time).
A reduced
.I Win Score
makes for shorter, but riskier games
since there's less time to catch up if you get behind,
and also because entries made to the score file are
scaled to 10,000 points \- thus making a loss by 500 points
into a recorded loss by 750 points, if
.I Win Score
is 7,500 points.
(This effect cuts both ways, however, since a win
is also scaled up to being a bigger win.)\ 
The current
.I Win Score
is always displayed on the screen,
and is set only at the beginning of each game.
.SH "COMPUTER PLAYERS"
Since it would be pointless to play the game alone,
the cube server provides some automatic competition as one or
more computer players.
One such player,
.BR \s-2CUBEX\s+2 ,
plays in every game,
but depending on the number of human players and some random factors,
one or more additional computer players also may join.
Each computer player has its own distinct playing style that
does not vary from game to game.
Each may also have a preference for
.I Standard
or
.I Blitz
mode games, though most have no preference.
Their competence ranges from mildly so to expert,
but no matter how it may seem at times,
the game is not rigged in their favor.
.SH "THE SCORE FILE"
The cube server keeps a score file that contains information about each
human and computer player that has played
.I cubes
on that system.
Regardless of the name chosen to display on the scoreboard,
human players are recorded in the score file by login name.
Computer players are recorded by their one and only name.
An auxiliary program called
.IR cuberank (6)
is provided to display the contents of this system's
.I cubes
score file.
.PP
As a convenient mechanism for keeping track of your personal ranking
history,
.I cubes
will append your current ranking information to the file ".cubehist"
in your home directory
(as specified by the
.B HOME
environment variable)
after each game played to completion.
.SH "JOINING A GAME IN PROGRESS"
A person may join a game in progress as either a new player,
or as an unnamed observer.
If the game is near ending
(defined as the high score being 75% or more of the
.IR Win \  Score ),
or if the
.RB ` \-p '
command line option was not specified,
you will be added to the game as an observer.
When the current game ends,
will be asked whether you wish to play in the next game.
You can join the game in progress with the
.RB ` g '
command.
If you choose to play,
you will be added as an active player at the end of the current round
and you will appear as the first player in the turn order.
Since coming into a game late with no points could ruin your ranking,
the cube server will give you an initial score
that is 500 points less than the lowest score,
but you still must meet the
.I On Board
turn point requirement to begin advancing your score.
.PP
Computer players will sometimes join particularly close games in progress.
Chalk it up to love of excitement, if you must.
.SH "QUITTING EARLY"
It is important to note that quitting a game before it ends
will probably result in a low score being added to your record,
possibly lowering your ranking against other players.
Except as described in the next paragraph,
if you quit a game before you get
.IR On \  Board ,
your average game point value,
.I GamPt
(see
.IR cuberank (6)),
is penalized by being adjusted to the value you would have had if
you had stayed in the game and lost with a score of half your average.
This adjustment is done by subtracting points from your cumulative point record;
your game count and other records are not altered.
Except as described in the next paragraph,
if you quit a game when you are
.IR On \  Board ,
your current score is recorded in the score file.
.PP
In games with more than one human player,
it is possible that a computer proxy will take over for
a player that quits the game early.
The chances of this happening are 20% if the exiting player is not
.IR On \  Board ,
and 60% if the player is
.IR On \  Board .
Proxies play with a somewhat erratic style,
so they should be almost indiscernible from humans.
No notice is given to anybody when a proxy takes over.
The absentee player will be credited with the score that the proxy
manages to attain by game end (for good or bad).
.PP
The cube server will not conduct a game that has no human players.
To meet that requirement,
when the only human player quits the game,
no proxy is assigned and the game is ended at that point.
The human player's score will be recorded in the score file
only if that player was 
.I On Board
at the time of quitting.
The scores of the computer players (proxies are included in this category)
are not recorded,
regardless of their
.I On Board
status.
In short, if the only human player quits a game before getting
.IR On \  Board ,
no record of the game is added to the score file,
although the human player will suffer the penalty described above.
.PP
Unlike previous versions of this game,
there is no point at which it is safe to quit early.
There is always a risk, if not a certainty, of being penalized for quitting.
.PP
Some computer players, like cowardly human players,
quit rather than get
.I On Board
very far behind,
suffering the same penalty that humans do when they quit.
Once the high score has reached 25% of the
.IR Win \  Score ,
before each turn, computer players that are not
.I On Board
decide whether to continue in the game.
If the computer needs more points to reach its average
than the leader needs to win, the computer may quit.
.BR \s-2CUBEX\s+2 ,
being oblivious to other players,
and possessing a singularly strong desire to play
.IR cubes ,
will not quit the game.
It should be noted that proxy players also will not quit a game.
.SH AUTOPILOT
A game of
.I cubes
usually takes about 20 minutes to play.
Strangely, starting a game of
.I cubes
seems to generate phone calls and visits from associates demanding
attention.
To allow players to deal with interruptions,
there is an autopilot mechanism provided.
The command to invoke the autopilot is
.RB ` x '
and can be used during your turn, or asynchronously.
You'll probably want to suspend
.I cubes
with a control-Z once you engage the autopilot.
The autopilot will play for you until you type
.RB ` g '
for go.
.PP
It should be noted that the autopilot is not a very good player.
.SH MISCELLANY
On some systems,
it is possible to tell the state of the cube server by doing a
.IR ps (1)
(or something similar) on it.
If a game is in progress,
the command line of the process will have been altered to
show the number of players, turn number, high score, and player up.
Even more useful is an auxiliary program, called
.IR cubestat (6),
that produces a more detailed report of the server status.
.PP
The last player in the turn order has somewhat of an advantage.
Therefore,
.I cubes
uses player order as a reward for good playing.
When a game is begun after the cube server has been idle,
the players will be ordered in reverse-rank order (top-ranked player last).
In subsequent games, players will be ordered based on the score from
the previous game, with best score last.
Any player that joins a game in progress,
or begins in a game that contains players from a just ended game,
is put at the beginning of the turn order.
If more than one such player enters a game on the same turn,
the new players will be added to the beginning of the turn order,
but, amongst themselves, will be ordered in reverse-rank order.
.PP
A control-Z (or whatever your suspend character is) will cause
.I cubes
to return you to the shell,
assuming that your shell supports job control.
The
.I cubes
process will continue to run silently in the background,
but will beep your terminal whenever you are being prompted.
Bring
.I cubes
back to the foreground (usually by typing
.RB ` fg ')
to resume play at the current point in the game.
.PP
Should the screen become garbled,
it can be redrawn by typing control-L
or, if you prefer, your terminal reprint character (usually control-R).
There may be a slight delay before
.I cubes
responds to the screen redraw request.
.PP
To keep the game moving,
there is a sixty second timeout on every question asked by
.IR cubes .
The program will beep your terminal bell every twenty
seconds until the timeout is reached.
Although the program tries to handle timeouts gracefully
and may engage the autopilot automatically
if you wait too long to roll.
.PP
When rerolling,
there are some synonyms for the four commands;
you may find some more convenient to type.
For hold,
the synonyms are
.RB ` q '
for quit rolling,
.RB ` n '
for no (don't roll again),
and
.RB ` . '
(period) for those who like to use a numeric keypad.
For roll,
there is a synonym of
.RB ` t '
for throw.
For keep there is
.RB ` s '
for save,
and, for the numeric keypad crowd,
.RB ` , '
(komma, er rather, comma).
.PP
The cube server uses a pseudorandom number generator to generate the die rolls.
Unlike real life, it is possible to see what a player would have rolled
by looking at what the following player rolls.
For instance, if a player debates whether to roll three dice,
then decides to hold, that player can check dice one, two, and three
on the following player's roll to see what would have been rolled.
This type of hindsight is not available in the physical world.
.PP
If you wish to use a shell script to invoke
.IR cubes ,
the script must take into account that
.I cubes
changes the meaning of the interrupt and quit signals.
Your shell script must not respond to these signals.
One way to accomplish this is to have your shell script
.I exec cubes
(see
.IR sh (1)),
thus avoiding the problem altogether,
since the shell script will ``vanish'' at the point of the
.IR exec .
Bourne or Korn shell example:
.PP
.nf
	exec /usr/games/cubes "$@"
.fi
.PP
If you have more processing that you wish to do after
.I cubes
exits, the
.I exec
method will not suffice.
Instead, your shell script must
.I trap
and do nothing with (but NOT ignore)
the two signals in question.
Bourne or Korn shell example:
.PP
.nf
	trap : INT QUIT
	/usr/games/cubes "$@"
	/usr/games/cuberank -n5
.fi
.PP
(If you prefer to write your shell scripts using
.IR csh (1),
you're on your own...)
.SH HISTORY
This game is an adaptation of a ``traditional'' dice game the author learned
from a friend twelve years before writing this program.
If the name of the game was learned at the time, it since has been forgotten.
The name
.I cubes
was coined as the name of this computer implementation of the game.
In the process of fine tuning the game of
.IR cubes ,
some liberties have been taken with the rules as learned.
What follows is a list of differences between
.I cubes
and the original (name unknown) dice game.
.IP (1) 4
The 500 point
.I Off Board
threshold did not exist in the original.
No minimum turn score was necessary to cross
.I Win Score
points.
.IP (2)
The 250 point
.I Win Margin
did not exist in the original.
The player with the highest score (at or above
.IR Win \  Score ,
of course)
at the end of the round was the winner.
.IP (3)
The scoring combination of
.I Four of a Kind
did not exist in the original.
.IP (4)
The scoring combination
.I Small Straight
did not exist in the original.
.IP (5)
In the original,
.I Five of a Kind
could be scored only in ones or fives.
(Even in
.IR cubes ,
scoring
.I Five of a Kind
in anything other than ones or fives is rare.)
.IP (6)
Scoring a
.I Straight
in multiple rolls has been added by popular demand.
It turns out that this combination adds quite a bit
more strategy to the game.
(Hint: compute the probabilities.)
.IP (7)
In the original game, there were no computer players!
.IP (8)
Quitting as a tactic to preserve ranking is a seemingly
unavoidable side effect of this implementation of the game.
In the real life dice game, people usually don't up and quit,
even if they start out way behind.
The quitting penalty is the fairest way, so far devised,
to mimic the peer pressure of a real life game.
.SH "ENVIRONMENT VARIABLES"
.DT
.nf
HOME		home directory
USER		login name
CUBEHIST	default ranking history file
CUBEHOST	default server host
CUBENAME	default player name
.fi
.SH FILES
.DT
.nf
$HOME/.cubehist	user's ranking history file
.fi
.SH "SEE ALSO"
cubes(6), cuberank(6), cubestat(6), cubeserver(6), ps(1), sh(1), termcap(5)
.SH AUTHOR
Greg Paris <gmp@rayssd.ray.com>