Пример #1
0
/********************** Wicket Fallen ************************/
void myscore::wicket(void)
{
int o_type,new_player;
cout<<"\n\n*********************************\n";
cout<<"           Wicket\n";
cout<<"*********************************\n";
cout<<"\nOut type? (Bold-1:Caught-2:Run_out:3).......";
cin>>o_type;
Out++;
Ball_count++;
team1.Set_Ball(player1);
if(Out>=Max_out){cout<<"\n\n*********************************\n";
cout<<"           Innings Complete\n";
cout<<"*********************************\n";
team1.Set_Status(player1,o_type+1);
getch();
return;
}
cout<<"\nNew Batsmans no: ";
cin>>new_player;
team1.Set_Out(player1,o_type+1,new_player);
player1=new_player;
if(Ball_count==6){over_complete();return;}
getch();
show();

}
Пример #2
0
/***************** One Dot Ball ********************/
void myscore::dot_ball(void){
cout<<"\n\n**********************************\n";
cout<<"             Dot Ball              \n";
cout<<"**********************************\n\n";
Ball_count++;
team1.Set_Ball(player1);
if(Ball_count==6){over_complete();return;}
getch();
show();
}
Пример #3
0
/****************** Add Current Player Run******************/
void myscore::add_run(void){
cout<<"\n\n**********************************\n";
cout<<"             Add Run              \n";
cout<<"**********************************\n\n";
cout<<"Runs? ";
int runs;
Ball_count++;
team1.Set_Ball(player1);
cin>>runs;
team1.Add_Run(player1,runs);
if(runs==1||runs==3)
    {
    int temp = player1;
    player1=player2;
    player2=temp;
    }
if(Ball_count==6){over_complete();return;}
show();
}