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 52 53 54
|
void Yahtzee_Screen(string titles[13])
{
string Yahtzee="YAHTZEE", Totals[4] = {" Left Side","Bonus (over 62)"," Right Side"," Grand Total"};
int len = Yahtzee.length();
for(int x=0;x<len;x++) // cout the game title one letter at a time, spaced apart
{
gotoXY(33+(x*2),2);
cout <<Yahtzee[x];
Sleep(400);
}
Box(1, 6, 3, 12, 3, black on light_cyan, 1 , dark_gray); // Box to place player's name
Box(1, 6, 5, 60, 28, black on light_cyan, 1 , dark_gray); // Box to place left & right score boxes
gotoXY( 9, 4,"Player");
gotoXY(6,5,"\xC3"); // Join top two boxes
gotoXY(17,5,"\xC1");// ""
Box(1,10,6,25,13,black,light_yellow, 1 , dark_cyan); // Box for left scores - 1 thru 6 die values
BoxLineDown(1,28,6,13); // Divide word labels from scores
for( int x=0; x<6;x++)
{
gotoXY(11, 7+(x*2), titles[x]);
if(x<5)
{
BoxLineAcross(1,10,8+(x*2),25);
gotoXY(28,8+(x*2),"\xC5");
}
}
Box(1,37,6,25,15,black,light_yellow, 1 , dark_cyan); //Box for right scores - 3of a kind, four of a kind, etc.
BoxLineDown(1,55,6,15); // Divide word labels from scores
for( int x=0; x<7;x++)
{
gotoXY(38, 7+(x*2), titles[x+6]);
if(x<6)
{
BoxLineAcross(1,37,8+(x*2),25);
gotoXY(55,8+(x*2),"\xC5");
}
}
Box(1,10,20, 8,3,black,light_yellow, 1 , dark_cyan); // Box to place 'Total' for scorese
Box(1,10,22,25,9,black,light_yellow, 1 , dark_cyan); // Box for left, right scores and gran total
gotoXY(10,22,"\xC3"); // Join top two boxes
gotoXY(17,22,"\xC1"); // "
gotoXY(11,21,"Totals");
BoxLineDown(1,28,22,9); // Divide word labels from scores
for( int x=0; x<4;x++)
{
gotoXY(12, 23+(x*2), Totals[x]);
if(x<3)
{
BoxLineAcross(1,10,24+(x*2),25);
gotoXY(28,24+(x*2),"\xC5");
}
}
}
|