1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
int main()
{
srand((unsigned)time(0)) ;
//Player One rolling dice
vector<int> PlayerOne ;
for (int i=0; i<5; i++)
{
PlayerOne.push_back(rand()%6+1) ;
}
cout<<"Player One:" <<endl ;
for (int i=0; i<5; i++)
{
cout<<PlayerOne[i] <<endl ;
}
//Player Ones Data Structure
struct PlayerOneData
{
int score1 ; //The Score
int ones1, twos1, threes1, fours1, fives1, sixes1, ToAK1, FoAK1, Fullhouse1, Sstraight1, Lstraight1, Chance1, Yahtzee1 ; //All Actions
};
//Player Two rolling dice
vector<int> PlayerTwo ;
for (int i=0; i<5; i++)
{
PlayerTwo.push_back(rand()%6+1) ;
}
cout<<"Player Two:" <<endl ;
for (int i=0; i<5; i++)
{
cout<<PlayerTwo[i] <<endl ;
}
//Player Two Data Structure
struct PlayerTwoData
{
int score2 ; //The Score
int ones2, twos2, threes2, fours2, fives2, sixes2, ToAK2, FoAK2, Fullhouse2, Sstraight2, Lstraight2, Chance2, Yahtzee2 ; //All Actions
};
system("PAUSE") ;
}
|