“If you drink, don't drive. Don't even putt.” - Dean Martin

Hand Game Program

Here is a Hand Game Program. It's based off of a hand game that me and some buddies of mine play when we're board. The object of the game is to close both the hands of your oponent (the computer). You do this by dragging one one of your hands on to one of the computer's hands. Then the computer will "attack" one of your hands with one of its own. When an attack is made the two numbers on the two hands are combined. Once you get a 5 your hand closes. The only way to reopen a hand is when you have a 4 on the other hand. Then you can click the Split button and each hand will have a 2.

The computer has three levels of difficulty. On Easy it will randomly take a hand and attack a random hand. On hard it will close your hand if it can, if it can't it will not attack a hand of yours that can then close a hand of the computers on your next turn. On medium it will randomly play easy or hard some percentage of the time. The computer is beatable on Hard because of a few flaws in the programming (HINT it has to do with how the computer desides to split)


Hand Game .exe Compiled Windows Binary

Source\Main.vi Main VI which is the game.

Source\Comp Easy.vi Sub-VI which is the intelligence for the computer when on Easy.

Source\Comp Hard.vi Sub-VI which is the intelligence for the computer when on Hard.

Source\Comp Medium.vi Sub-VI which is the intelligence for the computer when on Medium.

Source\Control 1.ctl LabVIEW Control which is the hands you see in the UI.

Source\Hard Sub.vi Sub-VI which is used in the intelligence of the Hard intelligence.

Source\Split.vi Sub-VI used when splitting the hands.


Download the zip file and extract it. If you don't have the LabVIEW 8.2 Run-time Engine you must download and install it before you will be able to run the executable. The zip also contains the souce code.

Download Hand Game Program

Download LabVIEW 8.2 Run-Time

Photo Albums

All examples, instructions, tutorials, custom code, and documents created by Brian Hoover on this site are in acordance with the Createive Commons Attribution 3.0 license.

This means you are free to take, and modify any thing on this site, even for commercial use, as long as Brian Hoover is cited as the original creator, and that http://www.brian-hoover.com is the original source.

About Me

Everything on this site is taken as-is, and no support contract or warrantees are in place for obligated continued support. If you have questions about the content on the site feel free to contact the Webmaster.

Creative Commons License
This work by Brian Hoover is licensed under a Creative Commons Attribution 3.0 United States License.
Based on a work at www.brian-hoover.com.