The KFourInLine Handbook

# The KFourInLine Handbook

Martin Heni `<martin@heni-online.de>`

Eugene Trounev `<eugene.trounev@gmail.com>`

Benjamin Meyer

Johann Ollivier Lapeyre

Anton Brondz `<dinolinux@gmail.com>`

Revision KDE Gear 21.04 (2021-06-05)

Copyright © 1995, 2007 Martin Heni

Legal Notice

KFourInLine is a four-in-a-row game by KDE.

Chapter 1. Introduction
Introduction

# Chapter 1. Introduction

Game type: Strategy, Board

KFourInLine is a board game for two players based on the Connect-Four™ game.

The players try to build up a row of four pieces using different strategies. Pieces are placed on a board. The game can also be played against a computer, as well on network.

Chapter 2. How to Play
How to Play

# Chapter 2. How to Play

When KFourInLine loads, you can select the difficulty or start a two player game. If you like, you can also pick your color and select which color starts the game.

Each player is represented by a color (for example yellow or white for player one and red for player two). The goal of the game is to get four connected pieces of your color into any row, column or diagonal. The players move in turns. Each turn the player can place one of his or her pieces into any of the seven columns where each piece will fall to the lowest possible free place i.e. it will fall down until it reaches the ground level or another piece.

After one player's move is done the second player can make his or her input. 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.

A player who first manages to get four pieces in a row, column or diagonal wins the game. If no more moves can be made but no player has won, the game ends drawn.

Chapter 3. Game rules, strategies and tips
Game rules, strategies and tips

# Chapter 3. Game rules, strategies and tips

The board is separated into several regions.

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

The status display shows which player is controlled by which input device. A local player can input moves using keyboard or mouse, a remote player is shown as network input and finally the computer can control the input for a player. The status display further shows the player's names and the level of the computer opponent. Additionally the number of won, drawn, lost and ended games is noted for both players. Which player is next to move is indicated by one of the player's names being highlighted.

The statusbar at the bottom of the screen displays the status of the game and which player is next to play.

## 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 menu Settings → Network Configuration…. In the menu Game → Network Chat…. you find a chat dialog box which allows you to speak with your friend.

When a network connection is built you will be 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.

Chapter 4. Interface Overview
Interface Overview

# Chapter 4. Interface Overview

## Menu Items

Game → New (Ctrl+N)

  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 → Load… (Ctrl+O)

  Loads a saved game.

Game → Save (Ctrl+S)

  Saves the current game.

Game → End Game (Ctrl+End)

  Ends a running game.

Game → Network Chat…

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

Game → Show Statistics

  Shows a dialog containing information about the overall game statistics, that is games won, lost or drawn by both players. The dialog also allows to clear this all time statistics.

Game → Quit (Ctrl+Q)

  Quits the program.

Move → Undo (Ctrl+Z)

  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.

Move → Redo (Ctrl+Shift+Z)

  Replay a move which had been undone. If one of the players is played by the computer two moves are redone so that it is the player's turn again.

Move → Hint (H)

  The computer will calculate the best possible move for you and mark it with a sign on the game board. How good the move actually is depends on the level of the computer.

Settings → Theme

  Choose a graphical theme for the game. Which themes are available depends on the current installation.

Settings → 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.

Additionally KFourInLine has the common KDE Settings and Help menu items, for more information read the sections about the Settings Menu and Help Menu of the KDE Fundamentals.

Chapter 5. Game Configuration
Game Configuration

# Chapter 5. Game Configuration

KFourInLine can be configured using the configuration dialog with the Settings → Configure KFourInLine… menu item.

Starting Player Color: Determine which player color (Red or Black) has the first move in the next game.

Player Names: Change the names of the players.

Black Plays With: Choose who should play for player 1. It can be either Mouse or Keyboard, i.e. a local player using the mouse or keyboard as input device or Computer, i.e. the computer plays for this player.

Red Plays With: Same as Black Plays With but for player 2 (red).

Computer Difficulty: Select the level of the computer player.

Use AI learning: The computer AI can learn from mistakes made in one game.

Chapter 6. Frequently asked questions
Frequently asked questions

# Chapter 6. Frequently asked questions

6.1. Can I change the look of the game?
6.2. Can I use the keyboard to play the game?
6.3. I have lost control of who is in the lead, can I find it out?

6.1. | Can I change the look of the game?
| You can change the color of the pieces by opening the Settings → Theme menu item.
6.2. | Can I use the keyboard to play the game?
| You cannot use the keyboard to control the pieces.
6.3. | I have lost control of who is in the lead, can I find it out?
| Yes, you can see statistics by opening the Game → Show Statistics menu item.

Chapter 7. Credits and License
Credits and License

# Chapter 7. Credits and License

KFourInLine

Program copyright 1995-2007 Martin Heni `(martin AT heni-online.de)` and Benjamin Meyer.

Graphics copyright 2007 Eugene Trounev `(eugene.trounev AT gmail.com)` and Johann Ollivier Lapeyre.

Documentation copyright 2007 Martin Heni `(martin AT heni-online.de)` and Benjamin Meyer.

This documentation is licensed under the terms of the GNU Free Documentation License.

This program is licensed under the terms of the GNU General Public License.