Capstone Project Proposal COMP 10076 Capstone Prep: Approved
Capstone Project Proposal COMP 10076 Capstone Prep: Approved
Approved:
Background
Windows comes with a selection of card games that can be played. One of my favourite card games is
Cribbage. Cribbage is a widely played game but I have not found a good Cribbage program available
for free to play against an Artificial Intelligence(AI). The goal of this project is to create a simple and
easy to use Cribbage game with the same look and feel as other Microsoft Card games (ex: Solitaire,
FreeCell). The user will need to use the keyboard and mouse for basic input, some hot keys will be
available but the user will not have to use them to play a game. The user will need to know how to
play Cribbage.
Project Description
Technologies
This will be a desktop application written in Windows Presentation Foundation(WPF) C#. Microsoft
Visual Studio Editor will be the editor used to develop all C# code used behind the User Interface(UI).
To develop the UI Microsoft Expression Blend will be utilized. Git will be used for source control.
Testing of the C# code will be done using the Microsoft Visual Studio built in Unit Test Framework.
Project Functionality
Menu
The game will have a menu. It will have a New Game (hot key F2), Statistics (hot key F4), Options (hot
key F5), Change appearance (hot key F6) and Exit.
New Game
When a New Game event occurs a player will be randomly chosen to draw a card first (the AI or the
Human could draw the card first). The player with the lowest card starts with the crib.
2
Cribbage Project Proposal Simon Le Blanc 000073935
Statistics
The game will keep track of Games played and Games won by using the registry. The win percentage
will be a calculated value. The Statistics window will look almost identical to the Game Won window
(See Figure 6).
Options
Muggins
If this feature is turned on, the players will have to manually count the points in their hand during the
“Show” faze of the round. If the player counts incorrectly, then the opposing player may shout
“MUGGINS!” (will be a button that can only be pressed 2 seconds after a player declares there points).
If the player counting counted too low, then the player may take up to the maximum allotted points of
the hand. If the player counted too high then they will lose 2 points from the actual point value from
their hand.
If time permits, I will put different levels of AI challenge, for example an Easy, Medium and Hard
difficulty setting.
3
Cribbage Project Proposal Simon Le Blanc 000073935
Change Appearance
This feature will give the user the ability to modify the playing cards and the felt that is played on.
Figure 3: Different Appearances the user can Select to change the look of the game
Language
The user will have the option of playing the game in either English or French. In order for all of the text
to change to the desired language, the application will have to be restarted.
Each player will be dealt 6 cards face down from the deck. Each player will choose 2 of their 6 cards to
put into the crib, face down. The player who does not own the crib cuts the deck and draws a single
card. That card is put face up on top of the deck. Next the player who does not own the crib plays a
card from his hand first and then the other player plays a card. They score points on 15s, runs and
pairs and alternate playing until they are out of cards or neither player can play a card where the total
count of cards played is less than or equal to 31. If this happens the player who last played gets a “go”
4
Cribbage Project Proposal Simon Le Blanc 000073935
1 point. If the player plays a card and gets 31 they get 2 points. In either case, the card count is reset
to 0 and players repeat the process until out of cards.
The Show
The player who doesn't own the crib counts the points in there hand with the card on top of the deck.
Next the player who owns the crib counts the points in there hand with the card on top of the deck
and finally counts the points in their crib with the card on top of the deck.
All cards are then put back into the deck which is shuffled and the game starts over again from the
play. The player who did not own the crib, now owns the crib and the player who use to own the crib
now does not own the crib.
Scoring Points
Whenever a player scores points, the “Pegs” on the Cribbage change based on the points the player
scores. 2 pegs are used for scoring points, the peg which is the closest to the Finish line is the player's
current total points. The other peg was the player's previous point value. Example: A player has Peg 1
on point 6 and Peg 2 on point 18. The player count's his hand and earns 6 points. The player's Peg 1
5
Cribbage Project Proposal Simon Le Blanc 000073935
Upon completing a game, a dialogue box will be shown, either a Game Won or Game Lost screen.
The Game Lost screen will have the exact same information and buttons as above, only the text will
differ.
Test Plan
This project will use the built in Visual Studio Test projects to ensure all business rules are met. The
tests will be developed in C#. Tests will use hard coded data that should produce a certain result. A list
of some tests I will use:
• Given a hand with a 2 of clubs, 10 of clubs, 10 of spades and Queen of hearts, how many points
should that player score? Answer is 2, a pair of 10s of two.
• Given 4 games played and 2 games won, what is the win percentage? Answer should be 50%.
Resources
I will be using my home workstation for all development and most testing. I will be using MSDN
heavily for questions I may have during development.
Challenges
6
Cribbage Project Proposal Simon Le Blanc 000073935
Investigate how to use Expression Blend to create visual effects. Investigate how to determine native
operating system's localization to determine language settings and how to switch from English to
French. Creating an AI that is challenging to play against.
Project Plan
Week:
2. Development of playing Cards class as well as utility functions like how many points are in a
hand.
3. Testing of playing Cards class as well as utility functions like how many points are in a hand.
4. Basic UI Development
6. AI Development
7. AI Development
8. Test AI