for(int x=0; x <grid; x++)
cout < < "\t " < < x;
for(int y=0; y <grid; y++)
{
cout < < "\n\t " < < y;
for(int x=0; x <grid; x++)
{
if(Map[x][y] == LocationEmpty_Code)
cout < < "\t? ";
else if(Map[x][y] == LocationTreasure_Code)
cout < < "\t? ";
else if(Map[x][y] == LocationTried_Code)
cout < < "\t# ";
}
}
return 1;
}
void Treasure::noTreasureMessage()
{
int messageflag = (int)(rand()%2 + 0.5);
switch(messageflag)
{
case 0: cout < < "\nOh look, a hole with nothing in it. " < < endl;break;
case 1: cout < < "\nNo treasure here. " < < endl;break;
case 2: cout < < "\nThis is boring. " < < endl;break;
}
}
void Treasure::showmenu()
{
cout < < " _____________________________________________________________________________\n "
< < "| TREASURE HUNT |\n "
< < "|___________________________________________________________________________|\n " < <endl;
cout < < "Somewhere buried in a field is a treasure chest.\n "
< < "Find the treasure before the pirates arrives.\n "
< < "Symbols: '? '=Dig Site, '# '=tried, '* '=treasure " < <endl;