word

I101 Introduction to Informatics /
B100 Problem Solving with Computers
Assignment 6
The Game of Poker
Part 1:
Refinements,
Code as distributed
Part 2:
Final project code, Videos, Self and peer evals
Due Dates:
Sunday, Nov. 23
11:59 pm
Sunday Nov. 30
11:59 pm
Problem Specification:
Refine and expand the video poker game application developed in assignment 3. This consists of three
parts:
Part 1: The refinement requires that you revisit your assignment 3, identify the shortcomings and fix them.
These may include refining (changing or correcting) your Game Description, Game Rules , the Ranking of Winning
Hands, Card Pictures, or even your application’s GUI layout. Make sure that your input file is properly formatted
and all card images are available in the proper directory. Your CSV file should have the following columns. Save the
CSV file as “cards.csv”.
Initial Location
On Deck
1
2
3
4
Rank
Suit
Image (RS.jpg)
Description
1
2
3
4
Club
Club
Club
Club
C:\cards\1C.jpg
C:\cards\2C.jpg
C:\cards\3C.jpg
C:\cards\4C.jpg
Ace of Clubs
Given that a comma (,) has a special meaning in a CSV file, one must make sure
that no extra commas appear in the “Description” field.
In addition to identifying the refinements, type the code provided in class
into visual studio and upload the source code into your dropbox.
Part 2: The expansion of your application includes these steps:
Step 1: Add a new ComboBox. Load the following questions in the
ComboBox and when selected, load a short video answering each question.
This is your third attempt at making videos, make sure the lighting, camera
angle, and sound level are of high quality.
Question
How do I play poker?
How do I win?
Video
1 to 2 minutes
1 to 2 minutes
Step 2: Add a Textbox to the game indicating if the player has won and if so, how much. Implement at least 3 of
the following payout schedules:
a. Any pair = 0 coin
b. Two pair = 1 coin
c. 3 of a kind = 2 coins
d. Straight = 5 coins
e. Flush = 5 coins
f. Full house = 5 coins
g. Four of a kind = 10 coins
h. Straight flush = 10 coins
http://www.usplayingcard.com/gamerules/poker.html
HINT: Think about sorting the cards!!
Step 3: Start the player with an initial balance of 10 coins. Assume the player bets one coin per game. Maintain
the balance for the user by subtracting one coin from the balance every time the player is dealt a hand, and add
to the balance if the player wins a hand.
Optional: Store the balance in a file so that the player can stop and resume the game at a later time.
Problem Solving Objectives:
1)
2)
3)
4)
5)
6)
7)
Understand the game of video poker.
Build a realistic card game (Poker)
Understand random events
Understand the idea of repeating vs. non-repeating selection of cards
Developing alternative solutions
Designing the screen and user interaction prior to building the game
Thinking about how one should approach testing the card game
Programming Objectives:
1) Reinforce the use of GUI components, dynamic loading of images, random numbers conditionals, loops, file I/O,
procedures and functions, passing arguments by value and reference, arrays and array operations
2) Better understanding of classes.
3) Software maintenance and trouble shooting
Learning Goals:
1)
2)
3)
4)
5)
6)
Working within a team, research, brain storming, problem solving, data collection, data cleansing, data analysis, data
visualization.
GUI design (Forms, Buttons, Combo boxes, Textboxes, labels, picture boxes)
Conditionals, Loops
Procedures and Functions (pass by value vs. pass by reference)
Arrays
Classes
The Game of Poker
Assign.6 (P1)
Refinement
Revisit assignment 3, identify the shortcomings and fix them. These may include refining (changing or
correcting) your Game Description, Game Rules , the Ranking of Winning Hands, Card Pictures, or even
your application’s GUI layout.
Type the code provided in class into visual studio and upload the source code into your dropbox.
After completing this form upload it into your Dropbox as Assign6_P1
Upload your source code in the Dropbox
Problem
Identified
Who identified the
problem?
Proposed Solution
Why does the solution represent an
improvement over the previous
solution?
Who implemented the new
solution?
1)
2)
The Game of Poker
To represent a deck of cards,
Create a spread sheet with the following columns
Assign.6 (P1)
Make sure that your input file is properly formatted and all card images are available.
Upload the revised CSV file into your Dropbox as “cards.csv”.
Initial Location
On Deck
Rank
Suit
1
2
3
4
5
.
1
2
3
4
5
Club
Club
Club
Club
Club
Image (RS.jpg)
See below for
explanation
cards\1C.jpg
cards\2C.jpg
cards\3C.jpg
cards\4C.jpg
Description
Ace of Clubs
52

Image file names consist of a number (1 to 13) followed by a letter (c=Club, s=Spade, h=Heart, and d=Diamond).
The Game of Poker
Submission of the code as distributed in class
Assign.6 (P2)
Upload the project folder (zip file) into your Dropbox as “Assign6.P2”.
The Game of Poker
Submission of Videos
Assign.6 (P2)
Upload the video into your Dropbox as “Video1” and “Video2”.
Don’t forget your:
Self-and-peer evals, etc.