SYNOPSIS

xskat [-display|-d display] [-geometry|-g geometry] [-font|-fn font] [-iconic|-i] [-title|-T string] [-name prog] [-fg color] [-bg color] [-bt color] [-mark color] [-3d] [-2d] [-3dtop color] [-3dbot color] [-mb button#] [-keyboard number] [-tdelay seconds] [-fastdeal] [-slowdeal] [-help|-h] [-frenchcards] [-french4cards] [-germancards] [-german4cards] [-color] [-mono] [-color1 color] .. [-color4 color] [-large] [-small] [-up] [-down] [-alt] [-seq] [-list|-l file] [-alist] [-nlist] [-tlist] [-log file] [-dolog] [-nolog] [-fmt] [-unfmt] [-game file] [-briefmsg] [-verbosemsg] [-trickl2r] [-notrickl2r] [-lang language] [-start player#] [-s1 number] [-s2 number] [-s3 number] [-ramsch] [-noramsch] [-ramschonly] [-sramsch] [-nosramsch] [-skattolast] [-skattoloser] [-kontra] [-nokontra] [-kontra18] [-bock] [-nobock] [-bockramsch] [-bockevents number] [-resumebock] [-noresumebock] [-spitze] [-spitze2] [-nospitze] [-revolution] [-norevolution] [-klopfen] [-noklopfen] [-schenken] [-noschenken] [-hint] [-nohint] [-newrules] [-oldrules] [-shortcut] [-noshortcut] [-askshortcut] [-irc] [-noirc] [-irctelnet program] [-ircserver hostname] [-ircport number] [-ircchannel name] [-ircnick name] [-ircuser name] [-ircrealname name] [-ircpos number] [-irclog file] [-irclogappend] [-irclogoverwrite] [-auto #ofgames] [-opt file] [-pk] [player@display...]

DESCRIPTION

XSkat lets you play the card game Skat as defined by the official Skat Order.

Up to 3 players may be simulated by the computer.

After starting the game a mouse click or ESC/F1 will bring up a menu. Other useful keys are: Space, Return, Tab, Cursor left/right/up/down. The rest of the game controls should be fairly obvious.

An introduction to Skat can be found at

http://www.xskat.de/xskat.html

OPTIONS

In the following descriptions, the player starting XSkat is called player1.

-display display name

-geometry geometry specification

-font font name (default: 9x15 or 10x20)

-iconic

-title window title

-name application resource name

-fg foreground color

-bg background color

The usual X toolkit options.

-bt color

The color of dialog buttons.

-mark color

The color of the marks that indicate

who is forehand (during bidding),

who is the Soloist,

which card the computer would play,

or the keyboard focus

(default: red or black).

-3d

Use a 3D look for dialogs (default).

-2d

Use the old, flat style (default on monochrome screens).

-3dtop color

The color used for the lines around the top and left sides of 3D buttons (default: white).

-3dbot color

The color used for the lines around the bottom and right sides of 3D buttons (default: black).

-mb menu button

The number of the mouse button that brings up the menu (default: 0 = any button).

-keyboard number

Define how much of the user interface may be controlled by the keyboard. The number has the following meaning:

 0 : Nothing.
 1 : More (default).
 2 : Everything.

-tdelay seconds

Specifies how long the last trick will be visible. A delay of more than 10 seconds means that the trick will be removed after pressing a mouse button. In multiplayer mode the largest specified value is used (default: 0.7).

-fastdeal

Deal the cards without any time consuming animation.

-slowdeal

Deal the cards slowly (default).

-help

Show a short help text.

-frenchcards

Play with French suited cards.

-french4cards

Change the colors of diamond and spade to orange and green, so that the 4 suits have easily distinguishable colors (default).

-germancards

Use German cards.

-german4cards

Change the color of acorns to brown, so that the 4 suits have easily distinguishable colors.

-color

Use colored cards. If there are not enough colors left, the number of colors used to draw the cards will be reduced appropriately (default).

-mono

Use b&w cards.

-color1 .. -color4

Redefine the colors of the suits diamond, heart, spade and club. Selecting -french4cards overrides the colors for diamond and spade.

-large and -small

Select the size of the main window (default: as large as possible).

-down

Sort cards downwards (default).

-up

Sort cards upwards.

-alt

Sort cards in alternating order.

-seq

Sort cards in sequential order (default).

-list filename

The file for saving/restoring the game list (default: $HOME/.xskat.lst or ./xskat.lst if HOME isn't set. For IRC games: .irc instead of .lst).

-alist

Alternative form of listing.

-nlist

Normal form of listing (default).

-tlist

Listing with tournament scoring.

-log filename

Turn on automatic logging, i.e. append logs of all games to filename (- means stdout).

-dolog

Turn on automatic logging (default file: $HOME/.xskat.log or ./xskat.log).

-nolog

Turn off automatic logging (default). Logs of individual games may still be saved during the game.

-fmt

Write formatted log files, i.e. use backspaces for underlining and boldface.

-unfmt

Write unformatted log files (default).

-game filename

Read predefined games from filename (- means stdin). Not available for IRC play. See also section FILES below.

-briefmsg

Indicate who is forehand (during bidding) and who is the Soloist by displaying a small mark on the back of the cards.

-verbosemsg

Additionally print out everyones position and what is being played (default).

-trickl2r

Put down the cards of a trick from left to right (default).

-notrickl2r

Place the cards corresponding to the players positions.

-lang language

Currently available: English and German (default: $LANG/$LANGUAGE is tried first. Then: see Imakefile/Makefile).

-start number

The player who starts dealing cards (default: 2).

-s1 number

-s2 number

-s3 number

Change the playing strenght of the computer players.

s1 corresponds to the left computer in single player mode or to the one and only computer in two player mode.

s2 corresponds to the right computer in single player mode.

s3 is only useful with -auto.

The number must be between -4 (weak) and 0 (default).

-ramsch

Play a game of Ramsch when all players pass.

The following rules are currently implemented:

The Skat remains face down until it goes to the winner of the last trick (or to the loser of the game, s.b.). The amount lost is the number of card points taken. If two players tie for most card points, they both lose. If all tie, the score is 0. If one player takes no tricks (a virgin) the amount lost by the loser is doubled. Someone taking all the tricks (forced march) wins 120 points.

-noramsch

Don't play Ramsch (default).

-ramschonly

Play Ramsch each game.

-sramsch

Play Schieberamsch instead of simple Ramsch.

The rules are:

Each player in turn, starting with Forehand, may pick up the Skat and discard two cards face down. It's not allowed to pass on jacks. The score is doubled each time a player doesn't pick up the Skat.

-nosramsch

Don't play Schieberamsch (default).

-skattoloser

At the end of a Ramsch game the Skat is awarded to the loser(s). This will increase the loss.

-skattolast

The Skat goes to the winner of the last trick (default).

-kontra

Allow opponents to say 'Kontra' which doubles the score of the game. The Soloist may reply 'Re' to double the score again.

-nokontra

Disallow Kontra (default).

-kontra18

Only an opponent who said at least 18 may say 'Kontra'.

-bock

Play a Bockround after some special event. The score is doubled in the next 3 games. If an event causing a new Bockround happens before the current Bockround is over or several Bockround events happen at the same time, the number of Bockrounds still to play is increased appropriately.

-nobock

Don't play Bockrounds (default).

-bockramsch

Play a round of compulsory Ramsch after each Bockround. Before a game of Ramsch begins, each player in turn, starting with Forehand, may declare to play Grand Hand instead. After a Grand Hand the same player deals again because this game does not count towards completing the Ramschround.

-bockevents number

Specify the events that cause a Bockround.

(1) A game is lost with 60 points.
(2) A successful Grand Hand.
(4) A successful Kontra (opponents win).
(8) A game with Kontra & Re.
(16) A player's score ends in 3 equal digits.
(32) A player's score is a multiple of 100.
(64) A game value of +72 or more.
(128) A game value of +96 or more.

Add up the numbers in parentheses to specify the desired events (default: 0).

Notes:

A Kontra where the Soloist said Re but lost counts as one event not two (events 4 and 8).

To check a player's score, the current listing options of player1 are used (events 16 and 32). A score that is a multiple of 1000 counts as one event.

The game value (events 64 and 128) is the normal value without considering any doubling caused by Ramsch, Kontra or Bock.

-resumebock

Resume unfinished Bockrounds after quitting and restarting XSkat. The number of games to play is read from the game list file.

-noresumebock

Don't resume Bockrounds (default).

-spitze

Allow the Soloist to declare Spitze. This means that the last trick must be made with the lowest trump to win the game. This will be indicated to the other players by displaying the lowest trump. The game multiplier is increased by 1. It's not allowed to say Spitze in a Grand with 4 jacks.

-spitze2

Declaring Spitze increases the multiplier by 2.

-nospitze

Don't allow Spitze (default).

-revolution

Enable a special variation of Null ouvert. After the Soloist's cards are exposed the opponents can look at each other's cards and rearrange the cards between their two hands in any way they wish before the start of the play. Revolution is worth 92 points.

-norevolution

Don't allow Revolution (default).

-klopfen

During a Ramschround you may knock (klopfen) at the beginning of a game to indicate that you think you won't lose. This will double the score of the game. Klopfen is not possible if you don't pick up the Skat in Schieberamsch.

-noklopfen

Don't allow Klopfen (default).

-schenken

If the opponents decide at the start of the play that they cannot defeat the Soloist, they can give up. This is done by selecting Schenken from the main menu during the first trick when it's your turn. If the Soloist accepts, the score is as though the game was won simply. The Soloist can insist on playing on, but in that case has to make the opponents Schneider to win. The score in this case is as for an announced Schneider (the multiplier is increased by 2). If the Soloist goes on the opponents can schenken again, giving the Soloist the Schneider. The Soloist can accept Schneider or insist on playing on for Schwarz.

-noschenken

Don't allow Schenken (default).

-hint

Put a mark over the card the computer would play.

-nohint

Don't show computer hints (default).

-newrules

Use the official rules of 01/01/1999:

Lost Hand games count double.

The Grand Ouvert multiplier is 24.

(default)

-oldrules

Lost Hand games count simple.

The Grand Ouvert multiplier is 36.

-shortcut

Always finish the game when the remaining tricks will all go to one side.

-noshortcut

Play each trick.

-askshortcut

Ask whether a shortcut should be taken (default).

-irc

Play via Internet Relay Chat. This option will establish a connection to an IRC server where you can join other people for a game of Skat.

How it works:

Start XSkat from an xterm. Wait until the server has printed the welcome message. You are now on channel #xskat where new games should be planned. Everything you type into the xterm will be sent to everyone else on this channel. After you have found one or two other players and agreed upon the name of a new channel (say #xskat123), you should type /join #xskat123. When all players are on the new channel, exactly one player has to type /go (or /go2 if there are only 2 players) to start the game. Now you can play and talk.

-noirc

Don't use IRC (default).

-irctelnet program

Specify the program that will be used to connect to the IRC server. If you are sitting behind a firewall, a program like rtelnet must be used and you may have to set $SOCKS_SERVER to the name of your firewall host (default: telnet).

-ircserver host-name

Select an IRC server near you! (default: $IRCSERVER or irc.fu-berlin.de, if not changed in the Imakefile/Makefile)

-ircport number

The port of the IRC server to connect to (default: $IRCPORT or 6667).

-ircchannel name

The channel to join initially (default: #xskat).

-ircnick name

Your IRC nickname. If your nick is already used by someone else, a different nick will be generated automatically. Some servers allow a nick length of 30, others limit it to 9 characters. (default: $IRCNICK or $IRCUSER or $LOGNAME or xskatNNNN).

-ircuser name

Your user/login name. Note: most servers don't like faked user names (default: $IRCUSER or $LOGNAME).

-ircrealname name

Your real name (default: $IRCNAME or the entry from the passwd file or 'XSkat player').

-ircpos number

Select your position relative to the other players. Positions are numbered clockwise 1, 2 and 3. Player 2 will start dealing if not specified otherwise with -start or /start. If you don't specify your position or there is a conflict with someone else's choice or you give an invalid number (3 in a 2 player game), this will be fixed automatically. Choosing the right positions is important if you want to continue with a saved game list (default: 0 = I don't care).

-irclog file

Everything sent to or received from the IRC server is saved to this file (- means stdout). It may be useful for debugging (default: $HOME/.xskat.ilg or ./xskat.ilg).

-irclogappend

Append output to the log file.

-irclogoverwrite

Overwrite existing log file (default).

IRC commands:

/nick name, /nick - change or display your nickname.

/who - is on the current channel ?

/list, /list string - show all channels that match the word xskat or the specified string. This will take some time on networks with a large number of channels. Trying to stop the listing will terminate the program.

/pos number - see -ircpos.

/bell - toggle the alarm bell. When on, the bell will ring each time someone joins your channel or sends a message to you. The bell is off initially.

/quit - terminate XSkat.

/sync - if messages get lost due to a net-split (or because someone left the channel during play), XSkat will detect this and in most cases should be able to synchronize automatically (within 30 seconds) after the connection is reestablished. Typing /sync will try this immediately.

/quote command args - for those who know what they are doing.

The following commands are only useful for the player who will start the game by typing /go because that player will determine the rules of the game.

/default - set the official rules.

/ramsch, /sramsch, /skattoloser, /kontra, /bock, /resumebock, /spitze, /revolution, /klopfen, /schenken, /oldrules, /bockevents, /alist, /tlist, /start, /s1 - change the rules of the game. All of these require an argument (a number or True/False) just like the resources with the same name.

/rules - show the current rules to everyone on your channel.

Notes:

The version numbers of all participating programs must be equal.

Most options cannot be changed during the game. Options that can be changed are not saved to a file.

The game list can only be cleared during bidding or when it's your turn to play a card. There is a different default game list for IRC games (see -list).

It's possible to type into the xterm or the game window (which is recommended), but changing input sources in the middle of a line won't work.

If you want better input line editing and a split screen try the program ssfe. It is used like this: ssfe -raw xskat -irc

You can omit -irc when you specify any of the other IRC options.

-auto #ofgames

Three computers play the specified number of games without human interaction. The resulting scores are printed.

With this option, no resources are read, and the game list is saved only if -list is specified.

-opt filename

The file for saving/restoring all interactively changeable options of all players (default: $HOME/.xskat.opt or ./xskat.opt). Command line options take precedence over options specified in this file which in turn override resource specifications. This may be changed with the useoptfile resource.

-pk

If you want the computer to deal a Good Hand every time. (as requested by Petra K.) Alternatively, pressing F6 three times will result in a Good Hand for the next game. Does not work in multiplayer mode.

player@display

Specifies the display of the second and third player (but is ignored for IRC games). The player@ part may be omitted if the alias resource is set on display.

RESOURCES

Command line options take precedence over resource specifications for player1.

geometry, font, title, foreground, background

The usual X11 resources.

mark

(see -mark).

button

(used for 2D buttons, see -bt).

3dbutton

(used for 3D buttons, see -bt, default: a shade of gray).

3dbackground

(used for 3D dialogs, see -bg, default: a different shade of gray).

3d

True or False (see -3d and -2d).

3dtop

(see -3dtop).

3dbot

(see -3dbot).

menubutton

(see -mb).

keyboard

(see -keyboard).

tdelay

(see -tdelay).

fastdeal

True or False (see -fastdeal and -slowdeal).(#)

cards

0, 1, 2 or 3 (see -frenchcards, -french4cards, -germancards and -german4cards).

color

True or False (see -color and -mono).

color1 .. color4

(see -color1 .. -color4).

large

True or False (see -large and -small).

down

True or False (see -down and -up).

alt

True or False (see -alt and -seq).

list

(see -list).(#)

alist

True or False (see -alist and -nlist).

tlist

True or False (see -tlist and -nlist).

log

(see -log).(#)

dolog

True or False (see -dolog and -nolog).(#)

formatted

True or False (see -fmt and -unfmt).(#)

game

(see -game).(#)

briefmsg

True or False (see -briefmsg and -verbosemsg).

trickl2r

True or False (see -trickl2r and -notrickl2r).

language

(see -lang).

start

(see -start).(#)

s1, s2

(see -s1, -s2).(#)

ramsch

0, 1 or 2 (see -noramsch, -ramsch and -ramschonly).(#)

sramsch

True or False (see -sramsch and -nosramsch).(#)

skattoloser

True or False (see -skattoloser and -skattolast).(#)

kontra

0, 1 or 2 (see -nokontra, -kontra and -kontra18).(#)

bock

0, 1 or 2 (see -nobock, -bock and -bockramsch).(#)

bockevents

(see -bockevents).(#)

resumebock

True or False (see -resumebock and -noresumebock).(#)

spitze

0, 1 or 2 (see -nospitze, -spitze and -spitze2).(#)

revolution

True or False (see -revolution and -norevolution).(#)

klopfen

True or False (see -klopfen and -noklopfen).(#)

schenken

True or False (see -schenken and -noschenken).(#)

hint

True or False (see -hint and -nohint).

oldrules

True or False (see -oldrules and -newrules).(#)

shortcut

0, 1 or 2 (see -noshortcut, -askshortcut and -shortcut).

irc

True or False (see -irc and -noirc).(#)

irctelnet

(see -irctelnet).(#)

ircserver

(see -ircserver).(#)

ircport

(see -ircport).(#)

ircchannel

(see -ircchannel).(#)

ircnick

(see -ircnick).(#)

ircuser

(see -ircuser).(#)

ircrealname

(see -ircrealname).(#)

ircpos

(see -ircpos).(#)

irclist

(see -list).(#)

irclog

(see -irclog).(#)

irclogappend

True or False (see -irclogappend and -irclogoverwrite).(#)

opt

(see -opt).(#)

useoptfile

True or False (default: False). This is a resource for multiplayer mode (but not for IRC). It is ignored for player1. If set to True, the contents of the option file, which is owned by player1, are used. This means that you may end up with someone else's preferred settings if player1 used this file in a different multiplayer game.

alias

The player's real name (max. 2 words of 9 characters, default: $LOGNAME).

Only player1 may specify the resources marked with (#).

Filenames starting with ~/ are interpreted correctly if HOME is set.

FILES

An example of a file specifying predefined games:

# The following block specifies the distribution
# of cards for player1, 2, 3 and Skat(0).
# A 10  K  Q  J  9  8  7
  2  2  2  2  2  0  3  3  # Diamond
  2  2  2  2  2  3  3  3  # Heart
  1  1  1  1  1  3  3  3  # Spade
  1  1  1  1  1  0  3  3  # Club
# The following is not the same game !
# Player numbers rotate 3 -> 2 -> 1 -> 3
# (and depend on the start option).
  2  2  2  2  2  0  3  3
  2  2  2  2  2  3  3  3
  1  1  1  1  1  3  3  3
  1  1  1  1  1  0  3  3
repeat
# Repeat the above games forever.
# The following lines take effect only
# when you delete the 'repeat'.
random_seed 123456 0 2
# Specifies the random number which determines
# card distribution for all following games.
# The second number lets you skip that many
# games in the sequence.
# The third (optional) number defines
# who will start dealing cards (see -start).
# An additional L or R following this number will
# rotate the cards left or right.
# The random_seed will be shown in game logs
# to allow easy replay. Just type:
# echo random_seed 123456 0 2 | xskat -game -

NOTES

There are no official rules for the variations Ramsch, Kontra, Bock, Spitze, Revolution, Klopfen and Schenken.

If executing xskat player@otherhost:0 on yourhost gives an error message you could try the command xhost yourhost on otherhost to grant yourhost access to otherhost's display.

If you replay a game with your own cards, it doesn't matter whether 'Forehand changes' is set to 'yes' or 'no'.

Some versions of telnet have a bug, that prevents them from reading input from a pipe correctly. See README.IRC for a fix or put this into your ~/.telnetrc:

irc.fu-berlin.de
 set echo off
 set escape off
 set rlogin off
 set flushoutput off
 set interrupt off
 set quit off
 set eof off
 set erase off
 set kill off
 set lnext off
 set susp off
 set reprint off
 set worderase off
 set start off
 set stop off
 set forw1 off
 set forw2 off
 set ayt off

Leading blanks are important! Change the irc server line appropriately.

AUTHOR

Gunter Gerhardt

The latest version is always available at

http://www.xskat.de/xskat.html

This program is free software; you can redistribute it freely.
Use it at your own risk; there is NO WARRANTY.

Redistribution of modified versions is permitted
provided that the following conditions are met:
1. All copyright & permission notices are preserved.
2.a) Only changes required for packaging or porting are made.
  or
2.b) It is clearly stated who last changed the program.
     The program is renamed or
     the version number is of the form x.y.z,
     where x.y is the version of the original program
     and z is an arbitrary suffix.

Card images used with permission by
Spielkartenfabrik Altenburg GmbH, Marke ASS Altenburger
Leipziger Strasse 7, 04600 Altenburg, Germany