Copyright: ® 1995 Pete Koziar


Table of Contents
Confound Game version 1.40

This game is a strategy game that pits you against the computer. The goal of the game is to move one of your pegs onto the computer's home square while preventing the computer from reaching yours by placing walls on the board.

Table of contents:

Distribution/Copyright	Your rights and mine.

Introduction	Why I wrote it.

Installation	How to install it on your system

Playing the Game	How to play the game.

Menus	What the menus do

Strategy	Playing to win.

Acknowledgements 	Who helped.

Revision History.


Distribution of the Program
Distribution/Copyright

This document and accompanying program are copyright 1995 by Pete Koziar. This means that you may:

1. Try this program out for a time, after which, if you like it, you must register it by sending  $15.00 American to Pete Koziar, 3602 Cedar Drive, Baltimore, MD 21207. Please include your return address so I can send you the I.D. and code that will unlock the advanced features of the game.

2. Freely share this program among friends, relatives, BBS's, etc. so long as all pieces are included, i.e., the program itself and all documentation, including this document itself.

3. Distribute this program on diskette, either by itself, or as part of a collection of programs, so long as you make it clear to the purchaser that it is not "freeware" nor "public domain," but "shareware," and that the price he paid for the diskette does not include the registration fee for this program. You also are not to charge an excessive (over $15.00 in 1993 dollars) fee for the service.

You may not, however:

1. Modify any file in this collection in any way including, but not limited to, textual or binary changes, and distribute it to any other person or organization, without written or electronic mail permission from the author.

2. Continue to distribute this program if you receive written or electronic notice from me to stop.


Acknowledgements

Great thanks first of all, my wife who put up with her husband coming to bed late, and disappearing at unusual times, or sudddenly, with an odd expression, scribbling something down on whatever crumpled piece of paper he could find.

Also thanks to Ed and especially JoAnne, who put up with the original user interface, and with "Beta releases" every 2 or three days. I appreciate greatly JoAnne's ability to find ways to easily beat the computer as quickly as I could find ways to thwart them.

Finally, thanks to my employer who allowed me to take home the SDK which got the project started (it was perfectly legal, by the way -- I deleted it from my hard drive at work, since I wasn't using it at that time).


Revision History

Version 1.00	3/24/93	Initial Release

Version 1.10	7/07/93	- JoAnne (my ace Beta tester) said to me, upon one of my almost daily "Beta" releases, that it suddenly became much easier for her to win. "Well, ha-ha," I said, "that's pretty unlikely, since I haven't tinkered with the strategy module." It might have been unlikely, but it was also true. I introduced an interesting bug into the low-level code that meant two different ways of computng path lengths gave answers that differed by one square. This threw off the strategy significantly. Bottom line: fixed it in 1.10, so, everyone -- keep on your toes; this thing is mean and nasty again.

- Substantially altered the wall-building user interface. You don't want to know what it used to look like -- the developer's bane is that I had "gotten used to it," and so couldn't see how hard it was to use.

- Made minor improvements to the strategy module with regard to scoring of backwalls.

Version 1.20	9/07/93	- Many thanks to Mr. Guffey, whose kind comments on the program led to this release.

- Fixed (I hope) a bug in which a "phantom wall" appeared below the "wall pile" intermittantly, giving the user extra walls. (in case you're wondering, this was caused by a subscript running off the end of the UserWalls array, and looking instead at another data structure that sometimes looked like a wall, and sometimes not)

- In order to compensate for fixing this bug, added the Beginner level which always gets unlimited walls.

- Renamed "Difficulty" to "Configuration," and added a way to turn off the verbose error boxes once the user knows his way around.

- Added resources for pegs on monochrome monitors, making the User Pegs white, and the Computer Pegs black.

Version 1.21	10/31/93	- Fixed a strategy bug that only appeared on the most difficult level. It caused the computer to become fascinated by the user peg that remained on a home square. The computer thus left alone the "winning" peg until it was too late.

- Changed the way the computer picks among the best possible walls to place, in order to make the play more varied.

Version 1.22	12/17/93	- Externally, this appeared just like 1.21. All that was done was some internal rearrangement of messages to make translation into other languages easier (yes, there has been some interest in that regard -- I'm more than willing to help if that's what you want to do).

Version 1.30	1/1/94	- The strategy module has stayed virtually the same, but the user interface has been improved:

1. An ability to UnDo the last move.

2. Rearrangement of menus to agree with Window's User Interface Guidelines.

3. Addition of "registered enhancements." See the next section for details.

Version 1.31	1/10/94	- Almost within hours of uploading 1.30, I discovered a bug in it that applied only to the "registered" or "commercial" version in the area of opening and saving games. Sigh. That's what I get for rushing a release out. This was fixed in the commercial version of 1.30, by the way.

Version 1.32	1/23/94	- ARRGGGHHH! Did it again. Introduced a small bug into the 1.3x family, where you couldn't place a wall as your first move. After you moved a peg, you could place any wall you chose. Sorry about that, folks!

Version 1.40	1/31/95	- Lots of changes (as you can see, I've been working on it for a year)! This help file, for one thing, rather than the homebrew stuff I had before. I also followed the suggestion of one of my registered users, and changed it so you could click anywhere on the wall pile to pick up a wall, not just on an occupied slot. I've completely rewritten the "tube" defenses, and added a half-move lookahead in important places. Finally, I've made the walls monochrome for monchrome machines so you can actually see them now.


Introduction
Several years ago, there was a board game that was similar to CONFOUND. I loved playing it, but, since it wasn't your run-of-the-mill strategy game, in order to play it with someone, I had to first teach that someone the game. Of course, once that happened, I could have them for lunch since I knew the game very well, and they were just novices.

Well, time passed and, like a lot of other things I've enjoyed, the game went off the market and the company that did it went out of business (as far as I can tell-- I've looked, and can't find them anywhere).

When I started getting into Windows programming, I looked around for something to program, and thought of this game. This way, you start off with a knowledgable opponent -- the computer itself.


Installation
This game will run on anything that runs Windows 3.1. You're welcome to try it on Windows 3.0, but it's been several versions since I've tested it on 3.0, so I don't guarantee it. An 80386 or above is recommended for good response time. A color monitor is also recommended.

To install the game, copy CONFOUND.EXE, CONFOUND.WRI and CNFNDREG.WRI onto a convenient directory on your hard drive. If you can't think of any better one, your WINDOWS directory will do fine.

To start the game, either go into File Manager and double-click on CONFOUND.EXE in the directory you've copied it to, or install it into the Program Manager using the "NEW" command, and then double-click on its icon.

The game is shareware, which means you are allowed only to evaluate it for a relatively short period of time. After that, you must either register it or delete it from your disk.

To register it, send $15 American to:

Pete Koziar

3602 Cedar Drive

Baltimore, MD 21207

After which you will receive a letter with a User I.D. and a code to be used to enabled the advanced features of the game.


Playing the Game

Both you and the computer are racing to get one of your pegs on one of the opponent's home squares. Whoever gets the first peg on the opponent's home square wins the game.

Each move, you have a choice: to move a peg, or to place a wall, but not both. Each peg can move one square horizontally, vertically, or diagonally, so long as it isn't blocked by a wall.

You place a wall to slow down the computer, to stop the computer from placing a wall that will slow you down, or to make an unstoppable path in which you can advance (called a "tube.").

Once walls are placed, they "weld" to adjacent walls so you can't squeeze through.


Moving a Peg

To move a peg, first locate the mouse cursor over one of your (green or white) pegs. The cursor should change to the form shown.

At that point, press and hold the (left) mouse button. The cursor should change to this form.

Don't release the mouse button yet. You're holding the peg in your "hand" so long as you hold that button down.

As you move the mouse around, the cursor changes to the "No!" sign in every square you can't reach.

The peg will move to whatever square you are in when you release the button.

If you change your mind and don't want to move this peg, just release it over the square from which you picked it up.


Building a Wall

Placing a wall is a little bit complicated, but it should be a lot easier to do than it is to explain!

The sequence is,

o Pick up a wall from the "pile"

o Change it from horizontal to vertical (if required)

o Place it on the board.

To pick up a wall, move the mouse cursor to the "wall pile" area to the right of the board. Yours are the green ones (white if monochrome).

When you're over your "pile," the cursor will change to the "hand" form shown. Once that happens, press and release the (left) mouse button to pick up a wall.

The cursor will change to indicate you're holding a wall, and can carry it away from the "pile.".

This wall will be placed horizontally (i.e., left-to-right) if you place it now. If you want it to be vertical (top-to-bottom), you must "flip" it. There's a special "flipper" icon that flips a wall from horizontal to vertical and vice versa.

When you carry your wall over to the flipper, the cursor will change to the form shown at left.

If you then click the (left) mouse button, you've flipped the wall, even though you won't see the results until you've moved off the flipper icon. The cursor will indicate whether the wall is horizontal or vertical.

You then move the cursor over where you want the wall to be built on the board, and click the (left) mouse button again, and the wall will be placed. Pay attention to the cursor; if it changes to the "no" cursor, you can't build there. Pick another spot or flip the wall.

It might look like you could place a wall there, but there's a rule to remember: no wall can block the last path between a peg and a home square. This means there must always be at least one path through the maze to go from peg to square. The game won't let you place the wall that makes any home square unreachable to any peg.

If you change your mind, and don't want to place a wall at all, just move the cursor back over your "pile" (you don't have to flip it again), and click the (left) mouse button. Your cursor will change back to an "empty hand," and you're no longer carrying a wall.


Strategy

Like a lot of strategy games, this one has easy rules, but can get very complicated very quickly. You must plan ahead in order to succeed.

The game can be thought of as composed of an opening, middle, and end game. In the opening, you try to get both pegs into a good position for later in the game. You should get both of them off their home squares and into the game.

You also should be trying to build a "tube" of some sort -- an enclosed unstoppable path. Once you build a tube shorter than any tubes that the computer can build, you have effectively won the game.

The tactics you use in implementing your strategy are as follows:

o "Push a peg," i.e., move forward on your opponent.

o Place an offensive forward wall wall that blocks your opponent without blocking you. It's most effective if you can lure the computer down a long path that you then block off forcing it to retrace its steps.

o Place a defensive forward wall that prevents the computer from building a very damaging wall.

o Place a "backwall" that closes off all paths but the best one. Since there must always be at least one path home, this prevents the computer from blocking your best path.

o Build a tube. Be forewarned that this version is very good at detecting and stopping tubes-in-progress.

These tactics will also be used by the computer against you, so be careful.

Let's look at an actual game and see how some of these can be used.

As the game starts, both the human and the computer have placed offensive forward walls in their opponents' paths. The goal is to block your opponent without shooting yourself in the foot.

One of the most effective strategies is to build a "dead-end" that traps your opponent. He's marching along blissfully, until CRASH! He's facing a wall.

As you march forward, it's a good idea to place backwalls. If the backwall shown above wasn't placed, the computer could have placed a wall to the left of the human's peg, blocking that path. Now, if it were to try to build that wall, it could not, since it would block the path from that peg to any home square.

As this game progresses, offensive forward walls come fast and furiously.

Here the human has placed a defensive forward wall to prevent the computer from extending its barrier that reaches vertically from right below to right above its home square and to its left.

One of the things I enjoy about this game is the sudden turn-abouts. Within a few moves, the computer, who seemed not to be doing too badly, is utterly trounced. It finds itself facing a dead-end to the lower right, that will take it many moves to retrace. The human has built a tube (shown in black) that guarentees victory.

Note that this game was played at the easiest level to illustrate all the strategies. At the harder levels, the computer wouldn't have marched quite so handily down the path to defeat!


Menus
The Menus

This game has four different menus you can select from:

Game	To load, restore or start a new game.

Edit	To undo a move.

Configuration	To change the board, sounds, or colors.

Help	To access this file while playing.

You can access them either by clicking on them with the mouse, or by pressing and holding the Alt key, then pressing the first letter of the menu you want.

Let's go through these one by one. The first menu is the Game menu:

As you can see, this allows you to start a new game, register the game and, if registered, to open (i.e., resume playing) a game you've saved previously, or to save this game to resume at a later time. You can also use this to share particularly interesting games with a friend who has also bought CONFOUND.

To register, you must, first of all, send me $15 American. I will send you back a letter with a User I.D. and a Code in it. Once you receive that letter, you select the Register option, and should see a dialog box for entering that information.

Once all the options are enabled by registering, you can load games, start a whole new game or exit at any time. You can save games at any point except when either you or the computer has just won.

The next menu is an easy one, since it just has one item in it:

CONFOUND allows you to undo the last move you made. The only time you cannot is when you haven't made a move yet (i.e., just loaded or started a new game), or when either you or the computer has just won.

The next menu is the most interesting, and has the most on it. All of its setttings are remembered for all future games.

The first set determines how the computer plays:

Beginner	The computer has just minimal strategy, and you get as many walls as you want.

Novice	The computer still has minimal strategy, but you're limited to the number of walls in the "pile." The computer has less walls than you do.

Experienced	The computer now has as many walls as you do, and employs some more sophisticated strategy, like anti-tube warfare.

Expert	The computer uses every trick in the book: half-move lookahead, placing its own defensive walls, etc.

The next section defines how noisy the game is.

Verbose Errors	Every time you make a mistake, the computer will pop up a dialog box that tells you exactly what you did wrong. You must click OK to continue. You should keep this set at least until you get the hang of moving things.

Move Sounds	Everything you do has a sound associated with it. You need a sound card or a .WAV driver for your PC's internal speaker in order to hear these.

Error Beeps	Instead of the little dialog box on every error, just play the system attention sound.

The next section defines how the board is laid out, and is enabled for registered users only. You can only change this at the beginning of a new game (so, after you've won or lost, and want to try a different board layout, you must first select New from the Game menu).

Standard Board. Your home squares are placed one above each other, and you are moving right-to-left, the computer moving left-to-right.

Diamond. Each player is moving diagonally to get to his opponent.

Zig-Zag. Looks a little like the standard board, except you reach your opponent either by moving horizontally or vertically.

Random. Each time you play, it's a different board. If one looks particularly interesting, save it before you start to play and you can load and play it again and again.

The very last option on this menu should be set for those of you playing the game on a monochrome screen (LCD or CRT) on which you can't see the red and green pieces clearly. It will make the computer's pieces black, and yours white. Unfortunately, you must set this option, exit, then restart the game for it to have an effect. It does, however, remember the setting from then on.


About your CPU
Inside your computer is a little device called a "microprocessor." The kinds that show up in IBM-compatible PCs are the 8088, 80286, 80386SX, 80486 and Pentium, in increasing order of sophistication and speed.


Peg pop-up topic
The pegs are the little round objects on the board. Yours are green (or white), and the computer's are red (or black).


Home Square pop-up topic
Home-squares are the open circles on the board. Yours are green (or white), and the computer's are red (or black).


Shareware pop-up topic
Shareware programs are distributed for your evaluation before paying for them. Using them beyond a reasonable trial period without paying for them is a federal crime.