# Four Wins

Martin Heni

    martin@heni-online.de

Reviewer

2003-09-16
1.00.00

This documentation describes &k4wins; version 1.0.0

KDE kdegames game board board game four wins four four in a row win4 kwin4 connect four connect 4

## Overview

Four wins is a game for two players.

Each player is represented by a color (yellow and red). The goal of the game is to get four connected pieces of your color into a row, column or any diagonal. This is done by placing one of your pieces into any of the seven columns.

A piece will begin to fill a column from the bottom, &ie; it will fall down until it reaches the ground level or another stone. After a move is done it is the turn of the other player.

This is repeated until the game is over, which is when one of the players has four pieces in a row, column or diagonal or no more moves are possible because the board is filled.

## Rules

The board is separated into three regions.

The game board is constructed out of 7x6 fields which will be filled from bottom to top. The fields are marked in the color of the player who made the current move. On top of each column a colored arrow shows were the last piece had been put.

The status display shows which player color starts and which color is played by whom (player, computer, remote connection). It further shows the level of the computer opponent, the number of moves done as well as the computer calculated chance of winning. This chance is calculated only if the computer opponent makes a move. A positive number means that the player has an advantage, a negative number means that the computer thinks he is better.

The table display shows the number of won, lost and drawn games is noted for both player. Also the number of aborted games (Brk) and the sum of games is shown.

## Remote connections

It is possible to play the game over a network connection with another computer. One of the computers will act as game server. This one can determine who should play which color. You can configure the network options in the game menu, network dialog. There you also find a chat dialog box which allows you to speak with your friend.

When a network connection is build you are asked to enter a remote host and a port. The port can usually just be left untouched, but if you know what you are doing replace it by another number, which has to be the same in both player games of course. The hostname should be the name of the remote host to which you are connecting. Only the client in the connection has to supply a hostname. It is often wise that the player behind a firewall chooses to be client as the firewall might not allow incoming connections.

## Menus

### Game Menu

&Ctrl;N Game New

  Starts a new game. In a network game this option is only available for the network server. The network client will be automatically started by the server.

Game Open ...

  Loads a saved game.

Game Save As ...

  Saves the current game.

Game Abort Game

  Aborts a running game.

Game Network Configuration...

  Pops up a dialog for the network configuration. You can choose to be server or client. If you are server you can also choose what color the remote player should take over. If a network game is running you can also disconnect it in this menu.

Game Chat widget...

  Pops up a chat widget which allows you to send messages to the other party.

Game Show Statistics...

  Shows the all time game statistics and allows to reset it. This statistic is usually saved when the game ended and shows the amount of played and won games per player.

&Ctrl;H Game Hint

  The computer will calculate the best possible move and mark it with a small circle on the board. How good the move is depends on the level of the computer.

&Ctrl;Q Game Quit

  Quits the program.

### Edit Menu

&Ctrl;Z Edit Undo

  Undo the last move. If the previous player is played by the computer two moves are taken back so that it is the player's turn again.

&Ctrl;&Shift;Z Edit Redo

  Replay a move which had been undone.

### Settings Menu

Settings Show Statusbar

  Toggle on and off the display of the status bar.

Settings Starting Player

  Determines which color player has the first move in the next game.

Settings Yellow Played By

  Chooses who should play for player 1 (yellow). It can be either mouse or keyboard, &ie; a local player using the mouse or keyboard as input device or computer, &ie; the computer plays for this player.

Settings Red Played By

  Same as Yellow Played By but for player 2 (red).

Settings Level

  Selects the level of the computer player.

Settings Change Names...

  Change the names of the players.

Settings Configure Shortcuts...

  Open a dialog which lets you redefine all the keyboard shortcuts.

### The Help Menu

&help.menu.documentation;

## Credits and License

&k4wins;

Program copyright 1995-2002 Martin Heni martin@heni-online.de

Documentation copyright 2002 Martin Heni martin@heni-online.de

&underFDL; &underGPL;

## Installation

### How to obtain &k4wins;

&install.intro.documentation;

### Requirements

In order to successfully compile &k4wins;, you need &kde; 2.0

All required libraries as well as &k4wins; itself can be found on ftp://ftp.kde.org/pub/kde/.

### Compilation and Installation

&install.compile.documentation;
&documentation.index;