These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Tuesday, April 13, 2010

ZIltch!

Executive Summary

For my project I choose to be a little unorthodox and create a game rather than a business solution. I chose to recreate the game Zilch which I have played various versions of throughout the years. I initially chose the game with the idea of adding AI to the program in the form of a computer opponent. However, after many grueling hours, I decided to stick with the basic functions and just make sure that the game worked without bugs.

Ziltch! is a game of chance, where you decide how many points to risk every time you roll the dice. Players who play too conservatively will not reach 10,000 points as fast as their more aggressive opponents. However, those players who play too aggressively will Ziltch often and be left behind. While there is a lot of luck involved, the game is enjoyable because of the conservative/aggressive dynamic.

Scoring

By far the most difficult part of the code was in calculating the scoring. This is where I spent the bulk of my time writing code. It turns out that there are 55 ways to score with 6 dice, 30 ways with 5 dice, 17 with 4 dice, 8 with 3 dice, 3 with two dice and 2 with 1 die. That’s a total of 115 different scoring possibilities!

Files

Because I included external references to pictures in my programming the 18 dice below must be placed in the same folder as the excel sheet in order for Ziltch to work. Feel free to download and play at your leisure. If you want a real challange try to write code to make player 2 a computer opponent!

Excel File:
http://files.gove.net/shares/files/10w/seh69/Zilch.xlsm

18 Dice pictures:
http://files.gove.net/shares/files/10w/seh69/1.bmp
http://files.gove.net/shares/files/10w/seh69/1gray.bmp
http://files.gove.net/shares/files/10w/seh69/1Select.bmp
http://files.gove.net/shares/files/10w/seh69/2.bmp
http://files.gove.net/shares/files/10w/seh69/2gray.bmp
http://files.gove.net/shares/files/10w/seh69/2Select.bmp
http://files.gove.net/shares/files/10w/seh69/3.bmp
http://files.gove.net/shares/files/10w/seh69/3gray.bmp
http://files.gove.net/shares/files/10w/seh69/3Select.bmp
http://files.gove.net/shares/files/10w/seh69/4.bmp
http://files.gove.net/shares/files/10w/seh69/4gray.bmp
http://files.gove.net/shares/files/10w/seh69/4Select.bmp
http://files.gove.net/shares/files/10w/seh69/5.bmp
http://files.gove.net/shares/files/10w/seh69/5gray.bmp
http://files.gove.net/shares/files/10w/seh69/5Select.bmp
http://files.gove.net/shares/files/10w/seh69/6.bmp
http://files.gove.net/shares/files/10w/seh69/6gray.bmp
http://files.gove.net/shares/files/10w/seh69/6Select.bmp

Executive Summary:
http://files.gove.net/shares/files/10w/seh69/VBA_Final_Project.pdf

No comments:

Post a Comment

Blog Archive