Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdlib>
- #include"poker_element.h"
- using namespace std;
- int main()
- {
- //Basic setting
- initial();
- shuffle(10000);
- shuffle(10000);
- shuffle(10000);
- shuffle(10000);
- // Player2 Start
- // endllise the Player1's amounts
- int Player1_card_keep;
- int Player1_card_score;
- int Player1_card_A;
- char Player1_card_wantYN;
- int Player1_servied;
- // Hack Mode ints
- char HackMode;
- int HackMode_use;
- int Player_Amount;
- //Int the For cycle
- int for_cycle;
- for_cycle=1;
- // set the int and char's value
- Player1_card_keep=0;
- Player1_card_score=0;
- Player1_card_A=0;
- Player1_card_wantYN='y';
- Player1_servied=0;
- char Explain;
- cout<<"This Version is a Dev Version, Comform you not to use this Version!!"<<endl;
- cout<<"Show out the Explain of this programe?(y/n)";
- cin>>Explain;
- if(Explain=='y'){
- cout<<endl<<endl<<"The Poker Ver0.10 Dev."<<endl;
- cout<<"The program would auto cancel your move while your point is >=21 even if you say keep draw."<<endl;
- cout<<"Show the Message about HackMode?(y/n)";
- cin>>Explain;
- if(Explain=='y'){
- cout<<endl<<endl<<"HackMode is a Mode for this programe that could help you cheat or Edit by hand without luck."<<endl;
- cout<<"It would ask you to Enable it or not later. But it is not such easy to enable actually."<<endl;
- cout<<"Hope you had a good luck"<<endl;
- }
- cout<<"Show out the Upgrade message?(y/n)";
- cin>>Explain;
- if(Explain=='y'){
- cout<<endl<<endl<<"Ver0.10 Dev / Upgrade for Multiplayer"<<endl;
- cout<<"This upgrade is about user to edit the amount of Player instead before's 4 player only "<<endl;
- cout<<"But unfortunately, What ever you choose would always 1 player now. This would be fix as soon as possible in 0.10.1"<<endl;
- }
- }
- HackMode=0;
- HackMode_use=0;
- cout<<"Enable the Hack mode?(y/n)";
- cin>>HackMode;
- if(HackMode=='a'){
- cout<<"Warring! This is not yet done! Are you sure to enable it?(y/n)";
- cin>>HackMode;
- if(HackMode=='b'){
- HackMode_use=1;
- }
- }
- cout<<"Show out the cards?(y/n)";
- cin>>HackMode;
- if(HackMode=='y'){
- display_allcard();
- }
- cout<<"Please key in the Player Amount(1~8 Avliable now)";
- cin>>Player_Amount;
- cout<<endl<<"You choose "<<Player_Amount<<"Player"<<endl;
- for(for_cycle=1;for_cycle<Player_Amount+1;for_cycle++){
- cout<<"Let's start!"<<endl;
- cout<<"Start draw!!"<<endl;
- // first draw
- while(Player1_card_wantYN== 'y')
- {
- Player1_card_keep=draw(1);
- Player1_card_keep=Player1_card_keep%13;
- Player1_card_keep=Player1_card_keep+1;
- cout<<"Player1 get ";
- cout<<Player1_card_keep;
- if(Player1_card_keep>10)
- {
- Player1_card_keep=10;
- }
- if(Player1_card_keep==1)
- {
- Player1_card_A=Player1_card_A+1;
- Player1_card_keep=11;
- }
- Player1_card_score=Player1_card_score+Player1_card_keep;
- cout<<""<<endl;
- if(Player1_card_score>21)
- {
- if(Player1_card_A>=1)
- {
- Player1_card_score=Player1_card_score-10;
- Player1_card_A=Player1_card_A-1;
- }
- }
- cout<<"Player1's point is now ";
- cout<<Player1_card_score;
- cout<<""<<endl;
- cout<<"Continute to get card?(Y/n)";
- cin>>Player1_card_wantYN;
- cout<<""<<endl;
- //The check for player score >=21
- if(Player1_card_score==21)
- {
- cout<<"Your point is already the max 21, You shall not keep draw";
- Player1_card_wantYN='N';
- }
- if(Player1_card_score>21){
- cout<<"You already higher than 21, Please not keep draw.";
- Player1_card_wantYN='N';
- }
- }
- //Hack mode message
- if(HackMode_use==1){
- cout<< ""<<endl;
- cout<<"Hack Messager"<<endl;
- cout<<"-----------------------"<<endl;
- cout<<"Let you keep get card?(y/n)"<<endl;
- cin>>HackMode;
- if(HackMode== 'y'){
- Player1_card_wantYN=1;
- }
- else{
- cout<<"Keep the value"<<endl;
- }
- cout<<"Edit the final Point direct?(y/n)"<<endl;
- cin>>HackMode;
- if(HackMode=='y'){
- cout<<"Please key in the value you want to let it be.";
- cin>>HackMode;
- Player1_card_score=HackMode;
- }
- cout<<"-----------------------"<<endl;
- }
- /* cout<<Player1_card_wantYN;
- cout<<""<<endl; */
- //show out message
- // do not have to do after the Check score>=21 done write
- /* cout<<"The check of the pick"<<endl;
- cout<<"Amount of Player The Basic card ";
- cout<<Player1_card_score<<endl;
- cout<<"Amount of Player1's A ";
- cout<<Player1_card_A<<endl; */
- //end check
- cout<<"Here is player1's card!!"<<endl;
- display_player_card(1);
- cout<<"This is Player1's card Sum!!"<<endl;
- cout<<Player1_card_score<<endl;
- if(Player1_card_score<=21)
- {
- cout<<"Player1 had not died!"<<endl;
- }
- else
- {
- cout<<"Player1 lose!"<<endl;
- Player1_servied=1;
- }
- system("pause");
- // Player1 End
- Player1_card_wantYN='y';
- }
- //start the end.
- /* cout<<"The report for the whole game."<<endl;
- cout<<"Player1:"<<Player1_card_score<<endl;
- if( Player1_servied==0){
- cout<<"Player1 servied."<<endl;
- }
- else
- {
- cout<<"Player1 died."<<endl;
- }
- cout<<"Player2:"<<Player2_card_score<<endl;
- if( Player2_servied==0){
- cout<<"Player2 servied."<<endl;
- }
- else
- {
- cout<<"Player2 died."<<endl;
- }
- cout<<"Player3:"<<Player3_card_score<<endl;
- if( Player3_servied==0){
- cout<<"Player3 servied."<<endl;
- }
- else
- {
- cout<<"Player3 died."<<endl;
- }
- cout<<"Player4:"<<Player4_card_score<<endl;
- if( Player4_servied==0){
- cout<<"Player4 servied."<<endl;
- }
- else
- {
- cout<<"Player4 died."<<endl;
- }*/
- // The Winner value
- /*
- if(Player1_card_score>Player2_card_score){
- if(Player2_card_score>Player3_card_score){
- if(Player3_card_score>Player4_card_score){
- cout<<"1st: Player1"<<endl<<"2nd: Player2"<<endl<<"3rd: Player3"<<endl<<"4th: Player4"<<endl;
- }
- if(Player3_card_scor
- }
- }*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement