Help For the Game Of Quadrex

Introduction

Welcome to the network Quadrex server. The rules of Quadrex are given below. The Quadrex challenge command is described here. Other commands are the same for all pbmserv games.

Start a new game between userid1 and userid2

The -size parameter sets the overall board size. This must be in the range 3..26 with the default being 19.

Rules

The board is initially empty. Vert starts then players alternate taking turns adding a piece of their colour to the board.

If the piece just placed forms a 2x2 square consisting of two similar diagonal stones, one opposite stone and an empty cell, then an additional piece of the majority colour is automatically placed at the empty cell. If this results in a similar situation, the same applies again, and so on indefinitely:
``` . . . . . . .         . . . . . . .         . . . . . . .
. . . . . . .         . . . . . . .         . . . . . . .
. . v h . . .         . . v h . . .         . . v h . . .
. . H . v . .  ---->  . . h H v . .  ---->  . . h h v . .
. . . . h . .         . . . . h . .         . . . H h . .
. . . . . . .         . . . . . . .         . . . . . . .
. . . . . . .         . . . . . . .         . . . . . . .
```

Player Vert (V) wins by connecting the top and bottom edges of the board with a chain of V pieces, while player Horz (H) wins by connecting the left and right edges of the board with a chain of H pieces.

Example

Below is a 19x19 game of Quadrex won by Vert, who has completed a chain of V pieces from top to bottom.

`       a b c d e f g h i j k l m n o p q r s `
```  19   . . . . . . . . . v . . . . . . . . .   19
18   . . . . . . . . . v . . . . . . . . .   18
17   . . . . . . . . . v v v . . . . . . .   17
16   . . . . . . . . . . . v . . . . . . .   16
15   . . . h h h h . . . . v . . . . . . .   15
14   . . . h . . h . . . . v . . . . . . .   14
13   . . . h . . h . . . . v v . . . . . .   13
12   . . . h . . h . . . . . v . . . . . .   12
11   . . . h . . h . . . . . v . . . . . .   11
10   h h h h . . h h h h h h v h h h h h h   10
9   . . . . . . . . . . . . v . . . . . .   9
8   . . . . . . . . . . . . v . . . . . .   8
7   . . . . . . . . v v v v v . . . . . .   7
6   . . . . . . . . v . . . . . . . . . .   6
5   . . . . . . . . v . . . . . . . . . .   5
4   . . . . . . . . v . . . . . . . . . .   4
3   . . . . . . . . v . . . . . . . . . .   3
2   . . . . . . . . v . . . . . . . . . .   2
1   . . . . . . . . v . . . . . . . . . .   1```
`       a b c d e f g h i j k l m n o p q r s `

Syntax

Moves are specified in the usual format "quadrex move board# userid password action" where action is one of:
```    F6      Place a piece at coordinate F6, which must be empty.    swap    Horz may elect to swap Vert's opening move as their first play.
This ensures that Vert does not start with too strong an opening move.```