# Four-in-a-Row Manual

The object of Four-in-a-Row is to place four pieces in a vertical, horizontal, or diagonal row while the opponent tries to block and make his/her own row of four. Four-in-a-Row can be played against another human or the computer.

2001-2002
Timothy Musson
2007
David Lodge (dave@cirt.net)
GNOME Documentation Project

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation Licence (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual.

This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the licence to the manual, as described in section 6 of the licence.

Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters.

DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENCE WITH THE FURTHER UNDERSTANDING THAT:

1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENCE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORISED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND

2. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

Timothy
Musson

    trmusson@ihug.co.nz

Four-in-a-Row Manual V2.8
September 2004

Timothy Musson trmusson@ihug.co.nz

This manual describes version 2.12 of Four-in-a-Row.

## Feedback

To report a bug or make a suggestion regarding the Four-in-a-Row application or this manual, follow the directions in the GNOME Feedback Page.

## Introduction

Four-in-a-Row is a four-in-a-row game for the GNOME Project. The object of the game is to build a line of four of your marbles while trying to stop your opponent (human or computer) building a line of his or her own. A line can be horizontal, vertical or diagonal.

To run Four-in-a-Row, select Four-in-a-Row from the Games submenu of the Main Menu, or type `gnect` on the command line.

Four-in-a-Row is included in the `GNOME-games` package, which is part of the GNOME desktop environment. This document describes version 2.8 of Four-in-a-Row.

Four-in-a-Row also features multiplayer support with two human players in hotseat or network mode.

## Basic Usage

### Playing Four-in-a-Row

To start a new game of Four-in-a-Row choose Game New Game.

The game board consists of seven columns and six rows. Above it, a special row indicates the current player and the marble about to be played. Each move consists of dropping a marble in one of the columns. The marble lands on the topmost empty row of the chosen column.

To make a move, click on a column with the mouse. To play with the keyboard, move the marble in the top row with the left and right arrow keys, and drop it in place with the down arrow key. Your marble will drop into the topmost empty row of that column.

Four-in-a-Row's Main Window

Four-in-a-Row's Main Window

The game is won when one of the two players manages to line up four of his or her marbles horizontally, vertically or diagonally. If the board fills up without a win, the game ends in a draw.

### Commands

To take back a move, choose Ctrl Z Undo move. If you're playing against a friend, this will undo one move. If you're playing against the computer, this will undo the computer's last move and then yours. Repeating this will return the board to its initial state.

Choose Ctrl H Hint to get a suggestion from the computer for your next move. This is shown in the status bar.

Choose Scores to show a tally of wins and draws for the current playing session. The scores will be reset to zero if Player Selection is changed in Preferences.

### Preferences

To change the game's settings, select Preferences from the Settings menu. This opens the Preferences Dialogue.

Configuration options in the Game tab are:

Player One and Player Two

  These two columns tell Four-in-a-Row who's playing and, if it is the computer, how hard they play. To play against a friend, select Human for both Player One and Player Two.

Theme

  The theme menu lists available themes and lets you choose your favourite.

Enable Animation

  Here you can toggle the game's animation on or off.

Finally there is a Controls tab to change the keyboard controls. To change a control, double click the appropriate entry and then press the new key.

## Creating New Themes

This section's included in case you'd like to make your own themes for Four-in-a-Row. It assumes you're familiar with basic text editing, graphics software and the command line.

### Images

Four-in-a-Row's tile sets contain six tiles of equal size, lined up horizontally. From left to right:

1. Player One's marble as it appears on the game board

2. Player Two's marble as it appears on the game board

3. The game board's background

4. The top row's background

5. Player One's marble as it appears on the top row

6. Player Two's marble as it appears on the top row

#### An example tile set

This image shows the six tiles in a tile set

Tiles three and four will be repeated over the game board and top row unless a full window background image is specified in the theme file.

#### TIP

PNG format is recommended for tile sets. The first, second, fifth and sixth tiles should contain some transparency if you want the background to show through. The third and fourth tiles should be solid, with no transparency, even if you'll be using a full window background image with your theme.

#### TIP

Tiles can be square or rectangular, and any size you like. Most of the tile sets that come with Four-in-a-Row use square tiles measuring 50 pixels by 50 pixels.

For a full window background image, there's a bit more work to do. Let's say your tiles measure 50 by 50 pixels each. The game's display measures 7 by 7 tiles, including the top row, so the ideal background image for your tile set measures 350 by 350 pixels.

#### TIP

Four-in-a-Row will automatically scale the background image if it doesn't match the tile set. This means you can make "large" and "small" versions of your theme, both using the same background image, just by having a large and a small version of your tile set.

So, you now have a tile set and perhaps a background image to go with it. The next step is to put them in the right place.

### Putting It Together

The last step is to put your image(s) where Four-in-a-Row can find them. You could put them in Four-in-a-row's install directory (which will depend on your particular system), but your home directory's probably a better idea.

Make a `~/.gnect` directory, and a `~/.gnect/pixmaps` directory. Those names are important, as Four-in-a-Row won't look anywhere else.

Copy your image(s) into the pixmaps directory.

If you start Four-in-a-Row from the command line, it'll give you clues about any problems it has with your new theme. If it has none, you'll find your new theme listed the Preferences Dialog.

Have fun!

## Network Games

Four-in-a-Row support networked multiplayer games which is provided by GGZ Gaming Zone. By connecting to a Four-in-a-Row server on the Internet, you can challenge other players in multiplayer games. For news, updates and a list of servers to connect to, see the gnome-games website.

To start the multiplayer game of Four-in-a-Row, select Game Network Game on the Four-in-a-Row menu.

### Connecting to a Four-in-a-Row network server

The Four-in-a-Row connection dialog is shown initially when starting a new network game. This dialog allows you to select a server to connect to, and the username that you will have while connected to that server.

It is possible to connect to a server with either a guest account or a normal registered account. Guest accounts allows you to anonymously login, while a normal login account allows you to reserve your own username which is protected by the password that you choose.

The Guest Login option should be selected if you want an anonymous guest account. If you want to create a new login account, then select the First-time Login option, with the username, password and email of your choice. If you have already created your account, you can connect by selecting the Normal Login option, and enter the username and password that you have chosen.

To connect to a server, click on the Connect button.

#### The Four-in-a-Row network connection dialog.

The Four-in-a-Row network connection dialog.

### Joining a game room

Once you have successfully connected to a server, you can choose which game room to join. To play a multiplayer game of Four-in-a-Row, select the Four-in-a-Row room. If you want to host your own game, then click on the Launch button. This creates a new table where other players can participate in a game against you. If there are any other games already started, then you can double-click on an existing game table to join it. The list of game tables on the right shows you the number of available seats, which means the number of players that can join the game table.

#### This Four-in-a-Row network dialog allows you to join a game room to find other players.

This Four-in-a-Row network dialog allows you to join a game room to find other players.

When creating a new table for Four-in-a-Row games, a preference dialog is displayed which allows you to customize the game, such as set the minimum number of players for the game. Once the total number of seats have been taken, then no more players are allowed to join that game table.

It is possible to chat with other players in network games. Ask for advice or help playing the games, but please be polite against other players.

### Waiting for other players to join the game

Once you have successfully joined a game table, then you have to wait until enough players have joined the table. The Players List menu item allows you to see a list of the players who have joined the game. The game will begin immediately when the total number of players in the the game have been reached.

### Playing multiplayer Four-in-a-Row games

Multiplayer Four-in-a-Row games have pretty much the same rules as normal Four-in-a-Row games, except that you are now playing against human players. This means that other strategies might possibly be better than when playing against AI players.

Once a player has won, the game ends and you can return to the initial network game screen. Then you can play yet another game of addictive Four-in-a-Row multiplayer!

## Known Bugs and Limitations

Occasionally a marble-dropping animation doesn't look as smooth as it should.

## Authors

Four-in-a-Row was written by Timothy Musson (trmusson@ihug.co.nz) and David Neary (bolsh@gimp.org). Various others have taken the time to help in many ways since work on Four-in-a-Row began.

The Velena Engine, Four-in-a-Row's main computer player, was written by Giuliano Bertoletti. We're grateful to him for allowing us to include his work, without which Four-in-a-Row wouldn't be nearly as worthwhile.

This manual was written by Timothy Musson.

To report a bug or make a suggestion regarding this application or this manual, follow the directions in this document.

## Licence

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public Licence is included as an appendix to the GNOME Users Guide. You may also obtain a copy of the GNU General Public Licence from the Free Software Foundation by visiting their Web site or by writing to

     Free Software Foundation, Inc. 59 Temple Place - Suite 330 Boston, MA02111-1307USA