     X4WAR(6)                                                           X4WAR(6)
                                      3-Apr-92

     NAME
          x4war - An X version of the Chinese four-state-war game.

     SYNOPSIS
          x4war  [options]

     DESCRIPTION
          x4war is a game like the Chinese board game, four-state-war. It
          involves four players, two players at the opposite position of the
          board play an ally and are against the other two. It runs under X
          Window environment. At First, players deploy their army on their own
          fields, then a war can be started after all have deployed their army
          correctly. During the war, each moves one of his/her pieces in turn.
          The goal of the war is to capture the COLOURS of the opponents.  By
          default, players are named 'PLAYER 0' through 'PLAYER 3', their
          positions on the board are sequenced counter-clockwise, PLAYER 0 and
          PLAYER 2 forms an ally and are against the ally of PLAYER 1 and PLAYER
          3.  Some description about the board and the pieces: There're six
          rectangular areas on the board in which the pieces can appear. The
          square at the bottom-left corner is the RIP, where your pieces are
          originally placed before a war session and is the place to collect
          dead pieces during a war session. The other five rectangulars are
          fighting fields (four at the sides and one in the middle). The
          fighting field at the bottom-middle belongs to you and you deploy your
          army in this field.  In the fighting fields, the circled places are
          called safe-depots, the two non-rectangular places at each side lines
          are called base-depots, other rectangulared places are just depots.
          For the path, the dotted thick lines are railways, other lines are
          just paths.  For the meaning of pieces. If you start the program
          without -debug option, all pieces will appear in the RIP first. There
          names in English are: (from left to right, in row order)

               COLOURS,  MARSHAL,  GENERAL,  M_GENERAL(Major General) (2
               pieces), BRIGADIER (2 pieces),  COLONEL (2 pieces),  MAJOR (2
               pieces), CAPTAIN (3 pieces),  F_LIEUTENANT (First Lieutenant) (3
               pieces), SAPPER (3 pieces),  MINE (3 pieces), BOMB (3 pieces).
               The ranks of some pieces are:

               MARSHAL > GENERAL > M_GENERAL > BRIGADIER > COLONEL > MAJOR >
               CAPTAIN > F_LIEUTENANT > SAPPER No rank for the other pieces.
               For fighting rules: When two ranked pieces meet, the higher
               ranked piece will defeat the lower ranked one, or they are
               removed together if at the same rank.  For non-ranked pieces:

                    a BOMB goes with everything;

                    a SAPPER can remove a MINE;

                    except BOMBs and SAPPERs, every piece meets a MINE will die
                    and the MINE is left undestroyed;

                                        - 1 -       Formatted:  December 2, 1999

     X4WAR(6)                                                           X4WAR(6)
                                      3-Apr-92

                    every movable piece can capture the COLOURS, it goes
                    together with the COLOURS.
          The object of the game is to capture the COLOURS of the opponents.
          For moving rules and miscellaneous during a war session:

                    You can move a piece along a path, to an empty depot or onto
                    a piece of the opponent's (which means a fight). You can
                    move several steps along the railway or one step along other
                    paths, provided that there's no other pieces block the path.
                    If you move a SAPPER on the railway, you can change its
                    moving direction.  For other pieces moving on the railway,
                    the direction cannot be changed, i.e., the piece can only go
                    straight lines or from the side of one field to the
                    corresponding side of other field.

                    You cannot move a MINE and the COLOURS after a war has
                    started.

                    A piece moved into the base-depot will die.

                    A piece in safe-depots cannot be attacked.

                    If a player's MARSHAL is killed, his/her COLOURS will be
                    shown faced up at other player's board.

     OPTIONS
          -pi string
               Specifies player i 's name.  i is between 0 - 3, default to
               "PLAYER i".

          -ci string
               Specifies the color of player i 's node.  i is between 0 - 3.

          -di string
               Specifies the display of player i.

          -two Game for two players. Then there's no ally. It is set such that
               PLAYER 0 fights against PLAYER 2, so the command option settings
               such as name, color, and display of players should be
               corresponding to PLAYER 0 and PLAYER 2. And the other two
               fighting fields are not used during a war.

          -debug
               A default deploy.

          -usage
               Gives the command options.

          -help
               Gives the command options.

                                        - 2 -       Formatted:  December 2, 1999

     X4WAR(6)                                                           X4WAR(6)
                                      3-Apr-92

     USAGE
          Press a button on your own piece to move it, release the button at a
          position and the piece will be placed there if it constitutes a valid
          move. First you deploy your army from RIP to your own fighting field,
          some deploy restrictions apply (see below). Then press START WAR to
          start a war session.  When a war has started, the players take turns
          to make a move. You can move your piece if an arrow is shown in the
          upper-left corner of the board. A broken arrow there means that it's
          not your turn to move.  The message box at the upper-right corner of
          the board shows each move and the fighting result. For a coordinates
          (w, x, y), it is defined from the view of the player 0's board as
          follows:

               w  specifies which field. Player i 's field is numbered i (i in
                  0-3), the middle field is numbered 4.  x and y specify rows
                  and columns in each field, respectively, which are in 0-6 and
                  0-5 for rows and columns in players fields and 0-2 for both
                  rows and columns in the middle field.
          The four talk boxes can be used for talking purposes. key input is
          shown in the corresponding box at all players screen.  The functions
          of buttons at the bottom-right of the board are as follows:

          NEW GAME
               Starts a new game after one game of war is over, then players can
               deploy their pieces to their field for the new war.

               Some deploy restrictions:

               .    the COLOURS can be deployed only in one of the base-depot;

               .    a MINE can be deployed only at the bottom two lines;

               .    no node can be deployed in the safe-depot.

               Other restrictions can be set by players. (such as: a BOMB cannot
               be at the first line)

          START WAR
               After you have deployed your army, you press this button to get
               ready for the war. After all four players have pressed the
               button, the war gets started and the one in his/her turn can move
               a node.

          REDEPLOY
               Re-deploy your army after you pressed START WAR button and before
               all players have pressed that button. After re-deploy, you should
               press START WAR again.

          PEACE
               Requesting for peace during the war. Then a dialog box is shown
               on the other player's screen, the others have to answer the

                                        - 3 -       Formatted:  December 2, 1999

     X4WAR(6)                                                           X4WAR(6)
                                      3-Apr-92

               request. If one answered NO, the war will continue.

          SURRENDER
               If you surrender, all your pieces are moved and all pieces on
               your board are shown faced up so that you can watch the rest of
               the war. (seems not a bad choice to enjoy other players battle
               tactics at the lose of your dignity)

          QUIT If you have been defeated, your quit will not affect the battle,
               otherwise you can only use it in your moving turn, and it will
               cause every one to quit.  A brief example session is like:

               1.   get four people and four displays.

               2.   run the program, set the boards to different displays.

               3.   each deploys his/her army correctly and then presses START
                    WAR.

               4.   after all have pressed START WAR, the war began and the
                    first one can move.

               5.   fight a decisive battle, have fun!

     SEE ALSO
          A Chinese guy or anybody who can read Chinese characters and knows the
          conventional rules about the war game.

     AUTHOR
          Xiaobing Chen, xiaobing@cs.sfu.ca  Feb 25, 1992

                                        - 4 -       Formatted:  December 2, 1999