Tralihs documentation

Introduction

Tralihs is a game for 2 players, Red and Green, played on a board with squares. Both players have a home and a pawn, that at the beginning of the game is placed at the opponent's home. The intention is to make a path to one's own home, and to move the pawn along this path. The player who firstly reaches his home, wins the game.

Game description

During a turn a player can several times place a card on a square of the board. A path-card contains a part of the path to be made. The possible path-cards with their so called path-parts are :

curve
viaduct
bifurcation
crossing

The second card is a viaduct so that the horizontal path and the vertical path are not connected. The third card enables (with its top side) to end a path. All these cards can be rotated each time with a quarter. Placing a card brings on some costs, for the 4 above path-cards successively: 1, 1, 2, 3 credits. At the beginning of each turn a player receives 4 credits, and at the very first turn only 2 credits.
Each player has a deck of cards, derived from a so called series of available cards. The complete series of cards consists of 180 path-cards. A deck contains only a subset of such a series, allowing double cards. The complete series is subdivided in 30 collections of 6 cards. Each collection is unique concerning its composition of path-parts. 6 collections are rare and contain all 4 different path-parts. The other 24 collections have always 3 different path-parts. Each card of the series has a front side corresponding with a path-part, and a general back side, and also a third side with an (animated) picture. The pictures and the matching path-parts can be viewed in the Deck-screen of the program.
The program generates - if desired - a new deck with arbitrary cards, with a size between 32 and 64 cards. It is possible to swap cards of one deck against cards of a deck from other players. During the game playing a deck is advantageous when it has many collections, and when many cards have been swapped. In the latter case a player gets more bonus-cards. At the moment there are 3 kinds of bonus-cards:

1 credit
2 credit
bomb

With the first 2 bonus-cards the credit value can be increased at any suitable moment. With the "bomb" an existing card on the board can be removed.

Program description

The program has the following screens:
The program features will be discussed per screen .

Play-screen

On this screen you can play the game. At the top left the visible part of the board is shown. Normally, the board is too big to present as a whole. So, only a window of the board is visible. It is possible to scroll across the whole board with the panel below:
shift
Clicking at the outer border moves the board 5 squares in the indicated direction.
Clicking at the middle ring moves the board 1 square in the indicated direction.
Clicking at the black centre moves the board back to its centre position.
The border squares of the board are always filled with border-cards. These cards always result in the end of a path.

nieuw game
By clicking on this icon you can start a new game. On the board the 2 homes appear and also the 2 pawns, each located at the opponent's home. The card of a home contains a piece of the path in the opponent's colour. A card to be placed must be connected to this colour (see below).
naar configuratie-screen
This icon brings you to the Configuration-screen.
draai kwart slag
With this icon you can rotate a path-card on the board by a quarter. This is only possible for the last path-card placed on the board.

beurt klaar
Clicking this icon indicates the end of your turn.
pion omhoog pion omlaag pion links pion rechts
Using these 4 icons you can move your pawn in the indicated direction along an existing path.
The costs are 1 credit per move.
information This field gives information about the game.

At the bottom of the screen there are 2 rows of 10 (sometimes empty) cards preceded by the credit panel of the corresponding player. The upper row belongs to player Red and the lower row to player Green, as indicated by the credit panel's background colour. The credit panel of the player whose turn it is, shows a number equal to the credit value. The panel of the opponent shows a dash. The 10 cards can be subdivided in :
card 1
the upper card of the play-deck
card 2-7
the 6 cards of a collection
card 8-10
maximal 3 bonus-cards

At the beginning of each turn a new card is drawn from the play-deck. Depending on the settings (see Configuration-screen) for this card is shown the path-part, or the picture, or the general back. Usage of the deck-card of the play-deck is initiated with a double click, at the costs of 1 credit. Then, the surrounding of the deck-card becomes yellow. When you next select another card from the row, then the surrounding becomes pink to illustrate that the deck-card has been paid already. The deck-card is either a path-card or a bonus-card.
A (paid and selected) path-card is placed on the game-board by clicking a square on the game-board. However, this square must connect to the build path of the player's colour. The path on the placed card is further coloured only after it has become clear, that placing of the card has finished, because the just placed card can be rotated. The program recognises the finishing of a placed card, when the player selects a card from his row, or clicks the "end-of-turn"  einde-beurt icon. After a connection has been made between the red path and the green path, then all connected paths become blue.
If the deck-card is a bonus-card, then with a doubleclick it can be added to the set of bonus-cards. This is only possible when the 3 places for the bonus-cards in the row are not occupied yet.
Each time a deck-card has been played, a new deck-card appears. If the play-deck is exhausted, then after shuffling it is used again.

Playing a card of a collection happens in almost the same way as for a deck-card. Firstly, it must be selected (with a single mouse click) so that it gets a yellow surrounding. This does not cost any credits. Secondly, the card can be placed on the game-board, and optionally rotated one or more times. After all cards of the collection have been played, then automatically 6 cards of a new collection appear, provided that a complete collection is still available in the deck. If not, then a new collection becomes available after the deck has been shuffled.

Playing a bonus-card depends on the type of card. A card with extra credits can be played (free of credits) with a doubleclick. The "bomb" must firstly be selected (card gets a yellow surrounding), and then the square on the game-board must be clicked. That square may not be a home, or a square containing a pawn. After shuffling of the play-deck new bonus-cards become available.

When the play-screen has focus (via a mouseclick) then the following keys hold:
0 Select the card of the pile.
1-6 Select a card of a collection.
7-9 Select a bonus-card.
G Start new game.
o Rotate card a quarter.
ENTER End of turn.
X Computer makes a move.
SPATIE Shift the board  to its centre position .
l Shift the board one square to the left.
r Shift the board one square to the right.
u Shift the board one square upwards.
d Shift the board one square downwards.
L Shift the board 5 squares to the left.
R Shift the board 5 squares to the right.
U Shift the board 5 squares upwards.
D Shift the board 5 squares downwards.
n Move the pawn one square in north direction.
e Move the pawn one square in east direction.
s Move the pawn one square in south direction.
w Move the pawn one square in west direction.

Configuration-screen

This screen contains some boxes that will be discussed from top to bottom.
By clicking on you go to the Play-screen, and by clicking on you go to the Deck-screen.
Box "Red deck" is intented to or the deck of player Red. With button a new deck is generated. The size of the new deck can be specified between 32 and 64 cards. Only a deck for playing can be loaded, not a deck for swapping.
Box "Green deck" has the same function as "Red deck", but then for player Green.
In box "Registration" the registration characteristics can be indicated. For unregistered players the option "Unregistered user" must be marked. Registered users have received a registration file "Tralihs.usr". This file must be offered to the program by pressing button , and selecting the mentioned registration file. At the next start of the program, the name of the registration file is remembered and the option of being a registered user is automatically selected. Also registered players can mark the option "Unregistered user". The marked choice is important for generating a new deck of cards. The registration code in the registration file will be administrated in the newly generated deck. For unregistered players special, arbitrary codes will be distributed. At swapping a card the registration-code is passed to the other deck and stored into it. The registration-code is also used for assigning a number of bonus-cards during a game. The deck is copied to a play-deck at the beginning of a new game. A play-deck of an unregistered player has always 2 bonus-cards. A play-deck of a registered player, with a present registration file, has more bonus-cards when the deck contains more collections, and more swapped cards, and more registration-codes of other (registered) players with whom has been swapped.
In box "Player" you can enter for players Red and Green, if you want to play yourself or if the program takes care of playing.
In box "Pile" you can enter how unpaid cards of the play-deck will be shown. The options are
In box "Size" the size of the game-board and the window of its visible part can be specified. Take into account the settings of your computer monitor. The minimum, default and maximum sizes (in squares) are:

mimimum
default
maximum
width board
8
20
32
hight board
7
15
31
width window
5
9
32
hight window
5
6
31

Deck-screen

In the Deck-screen you can see all 180 cards. You can also perform operations to swap cards of a deck (see below for the swap procedures). In the big, lower part of the screen you see the cards of your red/green deck (after clicking on button or button ). You can select which card you want to discard, and which one you want to obtain. The icons above a card have the following meaning:
not selected to discard
Card is not selected to discard. Clicking the icon selects the card.
not selected to obtain
Card is not selected to obtain. Clicking the icon selects the card.
selected to discard
Card is selected to discard. Clicking the icon cancels the selection.
selected to obtain
Card is selected to obtain. Clicking the icon cancels the selection.

The cards selected to discard and to obtain, determine the so called swap characteristics of a swap deck.


Shows all 180 cards.

Shows the deck cards of player Red.

Shows the deck cards of player Green.

Presents the path-part of the shown cards.

Presents the picture of the shown cards.

Asks for the filename of an existing deck of cards, and loads the deck to show its cards.

Asks for a filename of a (new) propose deck of cards, and saves the shown deck of Red/Green as propose deck, together with the swap characteristics. Saving is possible if the player is not registered, or if the player is registered and the registration file (according to the Configuration-screen) is present.

Asks for the filename of an existing propose deck of cards, and checks whether it can be swapped with the shown Red/Green deck. Asks then for a filename of a (new) swap deck of cards, and saves the shown deck as a swap deck together with the swap characteristics.

Asks for a filename of a (new) swap deck of cards, and saves the shown deck of Red/Green as swap deck, together with the swap characteristics. Saving is possible if the player is not registered, or if the player is registered and the registration file (according to the Configuration-screen) is present.

Asks for the filename of an existing swap deck of cards or a swapped deck of cards, and checks whether it can be swapped with the shown Red/Green deck. If so, then a single card is swapped. If the deck is a swap deck, then it will be overwritten with a swapped deck. This swapped deck contains the swapped card, that the other player will use for the swapping operation on his deck.

Go to the Play-screen.

Go to the Configuration-screen.

Cancels all swap selections.

Selects all cards in the deck to discard.

Selects all cards, that are not in the deck, to obtain.

A propose deck, a swap deck, or a swapped deck has a limited validity period of 7 days. Furthermore, such a deck may not be older than the deck that is used for the swap operation.

Moving up and down between the collections is possible with the following icons and keys:
collection omhoog
arrow up
one collection up
collection omlaag
arrow down
one collection down
pagine omhoog
page up
3 collections up
pagina omlaag
page down
3 collections down
begin
home
first collection
end
end
last collection

Swap-procedures

Swapping can happen with a short procedure or a long procedure. The short procedure consists of the commands: , , and .
The long procedure consists of the commands: , , , and .
The short procedure is more convenient when you are familiar with the swap-procedure and with the player with whom you are swapping. The long procedure is better suited to firstly inspect the deck of an other player before starting a swapping transaction.

The short procedure consists of the following steps:
  1. Player A selects the card(s) of his deck that he wants to discard and those that he wants to obtain.
  2. Player A saves the deck as swap deck with button .
  3. Player A sends the swap deck via e-mail to Player B.
  4. Player B inspects the swap deck of Player A in the Deck-screen with button .
  5. When Player B refuses to swap based on this swap deck, then the procedure stops. It is decent to reply an e-mail with the refusal reason to Player A.
  6. When Player B accepts the swap deck for swapping, then he goes a step back to his own deck via button or button .
  7. Player B selects the card(s) of his deck that he wants to discard and to obtain. At least on card must correspond with the selected cards of the propose deck of Player A.
  8. Player B now executes the swap action by clicking button . The program asks for the filename of the swap deck of Player A.
  9. Player B must now has to go to the Configuration-screen to save the changed deck (via ).
  10. The program has overwritten the swap deck of Player A as a swapped deck including the administration of the 2 cards that have been swapped.
  11. Player B sends the swapped deck via e-mail back to Player A.
  12. Player A inspects optionally the swapped deck of Player B in the Deck-screen with button to check whether the swapped deck corresponds with the sent deck. The card to be discarded from his deck is indicated by haveno , and the card to be added to his deck is indicated by wantok .
  13. Player A goes a step back to his own deck via button or button . This must be the deck that he used earlier in step 2 to make a swap deck.
  14. Player A now executes the swap action by clicking button . The program asks for the filename of the swapped deck of Player B.
  15. Player A must now has to go to the Configuration-screen to save the changed deck (via ).

The long procedure consists of the following steps:
  1. Player A selects the card(s) of his deck that he wants to discard and those that he wants to obtain.
  2. Player A saves the deck as propose deck with button .
  3. Player A sends the propose deck via e-mail to Player B.
  4. Player B inspects the propose deck of Player A in the Deck-screen with button .
  5. When Player B refuses to swap based on this propose deck, then the procedure stops. It is decent to reply an e-mail with the refusal reason to Player A.
  6. When Player B accepts the propose deck for swapping, then he goes a step back to his own deck via button or button .
  7. Player B selects the card(s) of his deck that he wants to discard and to obtain. At least on card must correspond with the selected cards of the propose deck of Player A.
  8. Player B saves the deck as swap deck with button .
  9. Player B sends the swap deck via e-mail to Player A.
  10. Player A inspects optionally the swap deck of Player B in the Deck-screen with button to check whether the swap deck corresponds with the sent propose deck. 
  11. Player A goes a step back to his own deck via button or button . This must be the deck that he used earlier in step 2 to make a propose deck.
  12. Player A now executes the swap action by clicking button . The program asks for the filename of the swap deck of Player B.
  13. Player A must now has to go to the Configuration-screen to save the changed deck (via ).
  14. The program has overwritten the swap deck of Player B as a swapped deck including the administration of the 2 cards that have been swapped.
  15. Player A sends the swapped deck via e-mail back to Player B.
  16. Player B inspects optionally the swapped deck of Player A in the Deck-screen with button to check whether the swapped deck corresponds with the sent deck. The card to be discarded from his deck is indicated by haveno , and the card to be added to his deck is indicated by wantok .
  17. Player B goes a step back to his own deck via button or button . This must be the deck that he used earlier in step 8 to make a swap deck.
  18. Player B now executes the swap action by clicking button . The program asks for the filename of the swapped deck of Player A.
  19. Player B must now has to go to the Configuration-screen to save the changed deck (via ).