The Triangle PuzzleTM Help

v1.00(CE): Win32/WinCE

Welcome to The Triangle PuzzleTM! Click here for Terms of Use.

Please choose from the help topics below:

Terms of Use
Why I Wrote This
About the Author


Thank you for choosing The Triangle PuzzleTM, the fun, challenging animated puzzle game with hints! With versions available for Windows (95/98/NT/2000), Windows CE, PalmOS and also Linux, etc. (Java version)!

Be sure to visit for tips, tricks and updates.

This documentation is for both the Win32 (Win95/98/NT4.0/2000) and Windows CE versions.

International users: for a translation of these instructions in your language, go to and enter the URL

Usage of this program indicates your acceptance of the Terms of Use. If you do not agree with these terms, exit the program immediately and uninstall it.

Note: this help file is the same for both the WinCE and Win32 versions. If you're viewing this on your Handheld or Pocket PC, you won't be able to navigate to the websites that this help file links to.

WinCE Advanced Users: if you have Pocket Internet Explorer on your WinCE device, you can open this HTML file (\Windows\TPuzzleW.htm) and jump to all links.

Main Contents


The Rules

The "triangle puzzle"  is an inverted triangle with 15 holes. To play:

  • remove a starting peg from any hole
  • choose an arbitrary peg and the jump either horizontally or diagonally over an occupied hole into an empty hole. Here are examples of legal moves:

  • remove the peg you jumped over. Repeat this process until there are no moves left. The object of the game is to end up with exactly one peg.

The Program

To play the game,

  • single-click on the starting peg to remove
  • for each move, single-click on the peg to move, then single-click on the hole to jump to
  • click on the [Undo] and [Redo] buttons to undo/redo a move
  • click on [Hint] to have the program suggest a move
  • click on the Solvable checkbox to have the computer indicate whether a solution to the puzzle exists after each move you make
  • click on the [New Game] button to start a new game
  • click on [Solve] to have the program solve the puzzle

Main Contents


On Win32 Machines

To install, run the setup program. To uninstall, use Add/Remove Programs from [Start Menu] > Settings > Control Panel.

On WinCE Machines

To install, run the setup program on your Win32 desktop. 

There are two ways to uninstall. We will assume you're using Microsoft ActiveSync 3.x to communicate with your WinCE device. If you have an older version, please upgrade to avoid going insane, especially if you're running Windows NT.

Preferred Method
  • from ActiveSync, choose Tools/Add/Remove Programs...
  • select Triangle Puzzle from the applications list (don't try to uncheck it, just select it)
  • click the [Remove] button
Alternate Method

On your WinCE device, use Remove Programs from [Start Menu] > Settings [> Control Panel]. This will leave a harmless, spurious entry on your desktop applications list.

Note that it is not possible to uninstall, then reinstall the program using the application manager alone. I don't like cluttering your computer with unnecessary files, so you need to rerun the setup program to reinstall The Triangle Puzzle. The spurious entry in the applications list is due to a shortcoming in the WinCE Application Manager.

Main Contents

Terms of Use

The Triangle PuzzleTM Copyright © 2000 by Mohan Embar. All Rights Reserved.

The Triangle Puzzle is a trademark of Mohan Embar, Inc.

Usage of this program indicates your acceptance of the following license conditions. If you do not agree with these terms, exit the program immediately and uninstall it.

This program comes with no warranties, either express or implied. In no event will the copyright holder be liable from any damages resulting from the use of this software.

This program is PropagandaWare. If you continue using this program seven days after the first use, you agree to visit the following websites:

You are exempt from this agreement if you do not have Internet access.

Permission is granted to any individual or institution to copy or redistribute this software provided that:

  • it is not altered in any way
  • it is not sold for profit
  • this copyright notice is displayed
  • if made available for download on a non-FTP web page, that a link be made to whenever possible

Developed in C++ using Microsoft®:

  • Visual C++ 6.0 (Win32)
  • eMbedded Visual C++ 3.0 (WinCE)
Main Contents


Dedicated to:

  • my Dutch wife, Wanda, for putting up with me, and
  • my daughter, Rebecca, for lighting up my life and forcing me to make each precious minute count, and
  • to my grandfather and his memory

Main Contents

Why I Wrote This

Technical Reasons

I wrote the Triangle Puzzle to show off my Palm OS® C++ application framework which is lightweight while still providing:

  • an object-oriented framework for forms and databases
  • automatic support for program options
  • automatic support for reading Memo Pad records with configuration information
  • built-in, configurable About and Instruction boxes
  • layered event handling

Click here to contact us for a whitepaper, more details and licensing information.

I also wanted illustrate several programming techniques (although most play the game for its own sake and couldn't care less about these techniques):

  • Applications can be written in such a way that they survive ports across languages and operating systems with a minimum of change (current supported languages: Delphi, C++, Java; operating systems:  Win32, WinCE, Palm OS, and any OS with a decent Java implementation (which, unfortunately, excludes all versions of Mac OS for the time being)).
  • Java isn't the only way to achieve cross-platform results, even with a non-trivial user interface. The native C++ executables for Win32, WinCE and Palm OS share the same, sizeable codebase with only a slight amount of operating-system-specific code. What's more, the resultant executables are small and fast (the 8K solution cache increases their size somewhat).
  • Java, on the other hand, can be pretty cool when appropriately used. The Java implementation of the Triangle Puzzle runs beautifully on Win32, Personal Java for Windows CE, Linux and HP-UX.

Personal Reasons

I wrote the first incarnation of the Triangle Puzzle on a TRS-80 Model III when I was 14 years old. That summer, we had gone on a family vacation to Door County, Wisconsin and I found and bought the puzzle at a gift shop. I spent that entire vacation unsuccessfully trying to solve the puzzle myself. When I got home, I typed in the BASIC version (here's the listing!) and started it running. It was churning away when my mom called out "Mohan, the pancakes are ready!" and I had to tear myself away.

When I came back upstairs, I saw SOLUTION FOUND: on my screen with a bunch of moves. My first reaction was: "Yeah right," and half-heartedly started making the moves. To my shock, the program had found a solution!

Main Contents

About the Author

Mohan Embar is one of those rare finds that has both outstanding technical and communications skills. Both an excellent mentor and developer, he has worked in a wide variety of projects, such as object-oriented billing systems, servlet frameworks and low-level UNIX printer drivers. He has both domestic and international experience with companies such as Nortwestern Mutual Life, Deluxe Data Systems, France Telecom, Société Générale, Cyco Software, and Kraft, Inc. He is fluent in English, French and Dutch and has a working knowledge of German, Spanish and Italian.

Mohan is also bilingual in C++ and Java and loves switching back and forth between the two languages, while making full use of the idioms of both. Visit the Cool Demos section at to see more cool programs written in C++, Java and other languages like Delphi and JavaScript.

Mohan Embar singlehandedly:

  • wrote the Delphi, Java and C++ (PalmOS, WinCE, Win32) versions of The Triangle Puzzle
  • authored the accompanying documentation and online help.

Is it creative and well-programmed? Is the documentation nicely written? Check out his other demos, download the source code and scrutinize it. If you like his work, you can try to hire his services if he's available. Click here to contact Mohan. (Contract positions only: no full-time positions, headhunters or consulting firms, please.)

Main Contents