This chapter describes how to run cardwords using the gtk client
cardwords_gtkclient
.
The client's user interface urgently needs to be improved,
but as long as it is as unfriendly as by now, this chapter will guide you
through the program.
While running X, type cardwords_gtkclient, or type the full path of the programm, if the directory where you installed it is not in your PATH environment variable.
After the program starts, you will see a dialog where you can set options.
I will now explain this dialog which is divided into several parts:
The fields in this dialog are:
The fields in this dialog are:
xwindows
programs open a window that is
larger than your screen, while other ones use so little room
on the screen that you might want to switch to a lesser screen
resolution.
This is an attempt to let the user decide how much room the
window will occupy, however it is very incomplete.
You can only change the size (in pixels) a card will occupy
on the screen.
This will also change the fonts used inside the
cards and card-table cells, but it does not affect the fonts
used in other places of the window.
And if you have no idea
about the width and height of the card-table grid, you will have
no clue which values to use here.
This has to change in the future.
The fields in this dialog have the following meaning:
cardwords_server
executable file is installed.
If you compiled the program with make and installed it with
make install, the computer will fill in the correct location
here. You should not change it.
Here you see a dialog where you can set
the host name and port number of the remote
cardwords_server
.
Set these if you want to connnect to a cardwords_server
that is already running somewhere.
You can save all options that you have set or start a local server or connect to a remote server or exit the program by clicking on the appropriate button. Use the `Start a local server'-button if you want to play a game against the computer.
If everything went well, you will now see a window displaying the card-table and some other info.
When all human players have logged on, the game starts.
You can see the card-table in the upper left area of the window. When most cells in the card-table grid are set to their default values, as I proposed in The card-table file, section 3.4, the board will appear mostly green. This is because I think card-tables in casinos always have a green surtface (but I have not seen one yet).
Cell attributes different from the default values are displayed inside the cells on a background of a different color. You can recognize cell points by the letter `C', word factors by the letter `W', and letter factors by the letter `L'.
All info about the cell currently under the mouse pointer is shown in the upper right corner of the window.
Below this, there is the score board. It shows whose go it is, how many points and cards every player has, how many points everyone got in the last round, and of course the names of the other players. The column entitled `Type' contains a `H' if this is a human player and an `R' if that player is a robot. When the network connection to a particular player breaks, then this player will become a robot.
One row in the score board is automatically highlighted when the game runs. This line indicates whose go it is.
Below the score board you can see a single line telling you how many cards are left in the pile.
The client can tell you what cards are there at all in the game or what cards can still be in the pile (or in the other players' hands) by opening two windows showing lists. Access these lists via the menu.
And now to the most important thing in this game: How to tell the game what move/trade/pass you want to do next.
On the lowest line in the window you can see the cards in your hand. When you click with the mouse on one of these cards, it usually[8] moves to the line above the hand. I call this line the action selection area.
You use the action selection area to decide whether you move, trade or pass and which card to use. And where to move in the case of a move.
While you can do moves and passes alone with mouse-clicking (except for the wildcards), you might have difficulties trying to trade card(s) this way. That is why I will first tell you about the `keyboard way' to do things in the action selection area in the following subsection:
Let me first describe what you see in the action selection area. The action selection area consists of the following items (from left to right):
There are braces around the coordinate pair whenever the current state of the action selection area is not a move, but a trade or a pass. This happens in either of the following cases:
In all these cases, when there are braces around the coordinate pair, pressing the OK button while there are cards inside the action selection area will result in trading these cards, or, if there are no cards in the action selection area, pressing the OK button will result in a pass.
I will now describe how to use the action selection area via the keyboard:
The action selection area is roughly in two different states: it expects either a coordinate pair or a card specification.
When your go begins, it expects a coordinate pair. If you want to make a move, and I think this is what you want most of the time, you can now change the current card-table location. type in a character and a number, in an order so that the coordinate which is common to all the card destinations of this move comes first.[10]
If you do not want to make a move, but rather a trade, you can invalidate the current card-table location by typing the point `.'. The current card-table location will then be shown with braces around and the button that previously held the label vertical or horizontal will be empty.
After typing the current card-table location or invalidating it, the action selection area is in card input mode.
You can then specify the cards that you want to move or trade by first typing their meaning, and in case this is not to uniquely identify any card from your hand because there are cards with the same face value but different points, type in the card's points thereafter. As soon as the program recognizes which card you mean, it will be moved to the composing area.
Specify wildcards by first typing space, then the desired meaning of the wildcard (even when you want to trade the card, in which case the meaning is irrelevant), and, if this was again not enough to identify the wildcard because there are wildcards with different points on your hand, type in the points of the desired card.
You can remove the last card from the composing area by typing the backspace key while in card input mode.
You can change the current card-table location while in card input mode by typing once `.' and then typing the new card-table location.
You can change a move into a trade while in card input mode by twice typing `.': The first `.' sets the state of the action selection area to expecting a new card-table location, the second `.' invalidates the current card-table location.
You can change a trade into a move while in card input mode by typing `.' followed by the new card-table location.
You can change the direction of a move by typing `/'.
Finish your go by typing return.
With the info in the previous subsection, I think you can find out how to do your moves with the mouse. But one thing has not yet been mentioned: You can change the current card-table location with the mouse by clicking in the desired cell in the card-table.
The first move has to obeye the start condition, see The card-table file, section 3.4. Subsequent moves must touch at least one card that is already on the card-table.
All words created by the new move must be valid, ie they have to be contained in the server's dictionary and have to have a length of at least 2 characters.
If a player tries a move that creates a word that is unknown to the server, the owner of the server (the player that started the server) will be asked if he liked to add this word to the dictionary of known words. The player whose move was rejected can try another move or trade or pass, or wait until the owner adds the missing word and then retry the previous move. Players will not be notified about new words. Use an irc client to communicate with the other human players or whatever you like.
When making a move, all cell points of the cells that are being covered by the new cards are directly added to the moving players score. The points of the cards he moves are counted word-wise: for every new word that is being created the points of the new cards are first multiplied with the cell's letter factor. The products are then summed up. The plain points of all cards that have already been on the board before this move are added to this sum. This sum is then subsequently multiplied with every newly occupied cell's word factor. When the sum has been multiplied with each and every of these word factors, the result is also added to the player's points.
The winner is the player with the most points in the end. But the game has currently no end. This will change.
Have fun!
cardwords
game