winzip icon

jPeaks (Tri-Peaks clone)

Email
Submitted on: 1/2/2015 9:54:00 PM
By: Joseph T Hicks (from psc cd)  
Level: Intermediate
User Rating: By 4 Users
Compatibility: VB.NET
Views: 1930
 
     This code is a clone (almost) of the solitare game Tri-Peaks(tm?). For those that don't know how the game is played, there is a base card at the bottom of the playfield. You select a card which has a face value one higher or one lower than the current base card (ie. if your base card is a ten, then you may select a nine or a jack). Although it doesn't really matter, Aces count as LOW, and can be "looped" back around to a king. The goal of the game is to clear off all cards. Points are scored by the number of cards you remove without resorting to a new base card from the draw pile. The first card you remove is worth 1 point, the second is worth 2 points, the third is worth 3 points, etc... (The longest streak I've had is 15 cards!) Drawing a new base card from the draw pile will make you lose 5 points (you *can* go into negative points) and you will lose 5 points for each card left on the playfield when you start a new game unless your draw pile is empty. You get 25 points for each "jPeak" that you clear and an additional 25 points if you clear all three (total bonus = 100 points). This game features almost all of the statistic tracking of the original Tri-Peaks game except for the persistant data (ie. when you close the game, all stats are cleared - nothing is saved). This functionality wouldn't be too hard to add using the DataSet.(Read/Write)XML procedures. On the technical side of the coin, this application makes use of cards.dll for all of the card faces and card backs and illustrates the use of old-fashioned API calls, user-controls, shared member functions and variables, interfaces, and (what I believe to be) average-to-good OO technique(s). Whether or not you vote on this code is up to you, but I would greatly appreciate some constructive criticism of my code and comments. And lastly (but not leastly) enjoy this completely free game! =)

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
// for :jPeaks (Tri-Peaks clone)
//**************************************
Copyright? Ha! Steal/modify/reuse/refurbish/(whatever) this code to your heart's content!
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.