CMPE 160 Project #1
Pişti
Due Date: 12th July 17.00
Project Description:
In this project you are to design a simple turkish card game, 'Pişti', using C++. Here is the terminology for card decks:
Spades
Hearts
Clubs
Diamonds
We will call the shapes 'House' and numbers 'Values' throughout the explanation. The cards with pictures are A: Ace, K: King, Q: Queen, J: Jack. Also the strengths of the houses are in this order, spades being the strongest house.
For those of you who don't remember the rules of pişti, here is a list of rules you should implement in the project:
Scoring process is as follows:
At each turn the user will select a card from her hand to throw. Computer will use a very simple AI to accomplish the same task.
AI :
When it's computers turn the AI should decide on a card to throw. A very simple AI is as follows:
You may write your own AI, and you may receive bonus points for it. But you are not allowed to change the first step, i.e. sorting is not optional. You may use any sorting algorithm you like.
Interface :
In each turn your interface should display the top card on the desk, how many cards are on the desk, your hand, computers hand (for debug mode of course), and any stats you want, like the score, number of turns, or number of cards in each players pools etc.. You may use Conio.h for interface design.
Implementation :
Consider the task and decide on a good object oriented design. Choose your objects and methods carefully. Avoid any redundancies. You may need to swap, add, delete elements, sort, merge and shuffle lists, which are arrays in this case. Once you implement these low level functions the rest should be straightforward. Do NOT forget to provide a debugging mode, where you can see the hand of the computer. Without that you cannot be sure that the AI is working properly.
Report :
You are also to give a nice report explaining your design and assumptions, along with the source code, which, of course, should be commented. Don't explain obvious stuff, explain your choices, show that you understand what's going on. Also make sure that you include sample runs of your project.
What and how to submit:
You will submit your report and code via e-mail to my (Cem, your assistant) e-mail address, with a proper subject line, such as "Name Surname Cmpe 160 Project X".