Các bác hỗ trợ giúp em đoạn code chơi bài Black Jack với 1 thang "máy"! có source nào ko help em cái !!! Out Put như sau:
BTP200 Black Jack
=================
Dealer : ??
Dealer : 10
You drew : A
You drew : 4
Draw ? y
You drew : 5
Draw ? n
You hold 20
Dealer drew : 3
Dealer drew : 10
Dealer drew : K
Dealer lost, you win!
Another game ? n
Have a nice day!
Có web mục nào hướng dẫn về toán tử (operator) ko !!! bác nào bít cho iem cái link hoặc cho em vài điều cơ bản , chân thành cảm ơn !!!
[=========> Bổ sung bài viết <=========]
Black Jack
Card Class
Design and code a class named Card that holds information about a playing card. Place your class definition in a file named Card.h
Upon instantiation, a Card may receive two character values holding the rank and suit of the card. If the object receives no values, it holds a safe empty state.
Include in your class design
* an operator that adds two cards,
* an operator that compares two cards for equality,
* a function that draws a card from a deck of cards, and
* a function that displays a card.
Design one operator as a member function and the other as a non-member function.
Name the module that holds your implementation Card.cpp
Black Jack
For your main module, write a program that plays black jack using your Card class. In your program, the computer is the dealer. Your program deals two cards to the player and two cards to the dealer, keeping the first card dealt to the dealer face down (hidden). Your program asks if you wish to draw another card and if so draws one. Your program stops prompting once your card values exceed 21 or you choose not to draw another card. Your program then exposes the dealer's hidden card and keeps drawing cards until the total value of the dealer's cards exceeds the value of your cards or 21.
Đây là đề bài chi tiết Tiếng Anh !!!
Bookmarks