Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve as soon as possible ECE 222 Project 1 Instructions: On submission of the project a final report must be handed in. Do the following

Solve as soon as possible
ECE 222 Project 1
Instructions:
On submission of the project a final report must be handed in. Do the following in the report:
Describe the program
o Logic of the program
o Features of the program
Describe problems encountered while programming, solutions to those problems, any current bugs in the code, and any uncompleted features
Send an email to your instructor or TA if you have any questions.
Due Dates:
November 11th submission of project code and report.
Grade
20% Final Report
80% Source Code
Project Description
Note: You should not use class for this project
Develop a simple poker game. You need to design appropriate variables for 1) the game machine and 2) the players. The former should include variables representing the amount of money in the pot and remaining cards that havent been revealed. The latter should include the player name, player number, and the amount of money on his/her account. You need to add additional variables in the program if you feel necessary. The game plays as following.
a) In the beginning of the game, it will ask you how many players. Each player will have an initial $100 on his/her account. The initial amount of money in the pot of the game machine is $50. Also, the game machine will generate a random sequence of 52 cards. You can ignore the type of a card (i.e., spades, hearts, diamonds, and clubs) and just have 4 of each number in the range of 1 to 13.
b) The game plays round by round. In each round, the game machine will show the two cards in the front of the card sequence (suppose it is 8 and Q) and remove them from the card sequence. Then, all players bet sequentially.
i. A player will first put down his/her deposit (smaller than the amount on his/her account) and then pick up the card in the front of the card sequence. The minimal deposit is $1.
ii. If the card is in between the two cards shown by the machine, the player wins (e.g., if the card is J). He/she will win the amount of money he/she previously deposited from the pot of the game machine. If the amount of money in the pot is smaller than his/her deposit, he/she can only win the amount of money in the pot.
iii. If the card is NOT in between the two cards shown by the machine (e.g., if the card is 8), the player loses. Then the money he/she deposited will be subtracted from her account and be added to the pot.
iiii. If the player wins, the current round finishes. The game will repeat another round.
c) When the number of remaining cards in the card sequence is smaller than 3. The game machine will shuffle and generate another random sequence of 52 cards. Then the game will continue from the front of the new card sequence. You need to prompt so on the console when it happens.
d) Note: whenever the amount of money in the pot becomes 0, each player has to pay $10 to the pot from her account, so that the game can continue. You need to give a hint on console when this happens.
e) Note: If the amount of money on a players account becomes 0, he/she loses the game and will be kicked out. This player will no longer be involved in further rounds of the game. You need to give a hint on console when a player is kicked out.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions