Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
a human opponent. All that is required is a text based game. You can get up to 10% extra credit for adding graphics. Your program should run from the command line if the string -o or -open is found among the command line arguments then your program should play an open game (where the human can see the cards that your program has) we need this for grading purposes.
For this project, you should do some research into the game of poker to learn the rules and the hand rankings (you might even want to try playing a few games with your classmates). You need to identify the category of a hand - if a hand contains a only a high card, a pair, two pairs, three of a kind, a straight, a flush, a full house, four of a kind, or a straight flush. If the string -t3 or -test3 is found among the command line arguments then your program should start reading from strings from the console until end of input. The user will supply 10 character long strings. Each string will be of the form RSRSRSRSRS where R can be any one of the set (2,3,4,5,6,7,8,9,T,t,J,j,Q,q,K,k,A,a) and S can be any one of the set (C,c,H,h,S,s,D,d). For each string your program must classify the category of the hand (HighCard, Pair, TwoPair, Trip, Straight, Flush, FullHouse, Quads, StraightFlush).
Code Style (10%) -modularity of design -comments -variable names -indentation and white space Documentation (10%)
In addition to submitting Java programs, you are required to submit one text document (possibly named README) which specifies for each problem:
1. A one paragraph description of how you solved the problem 2. Detailed instructions on how to run the problem (What command arguments/input you give to it, what output the program prints out, what the outputs mean, etc.) 3. User created test cases, if any
Project Submission
The project is due November 8th. Submissions will be received via blackboard. You are expected to submit: Java source files and compiled Java class files. You may also submit any additional files needed for running the programs. Documentation, described in the section above. If you submitted any additional files, explain what they are and where they are used.
Grading
Evaluation for each problem will be divided into test cases, code review and documentation. The TA will compile and test your program with a few test cases, and also with any test cases you provide. If your program only produces partial results, providing your own test cases will give you partial credit for the parts that operate correctly. The code review will be based on evaluating the correctness of your code.