/* //! Generated Date : 2007-06-25 For demo purpose only */ #include #include "master.h" #include "player.h" #include "base.h" #include "util.h" #include "write.h" #include "score.h" void help(int* tt) { int z, w ; skipline(1); z = 0; /* Enter the guess you need the hint for */ while (z < 1 || z > cur) { z = 0; format_output("Enter the guess you need the hint for -> ",1); while((*tt = getchar()) != '\n') z = z * 10 + *tt - '0'; } w = 0; /*choose the peg you need the hint for */ while (w < 1 || w > 4) { w = 0; format_output("Which peg of guess",1); printf(" #%d -> ",z); while((*tt = getchar()) != '\n') w = w * 10 + *tt - '0'; } format_output("In guess",1); printf(" #%d,",z); printf("peg #%d received ",w); if (guesses[z - 1].pegs[w - 1].used == BLACK) format_output("a black peg.\n",0); if (guesses[z - 1].pegs[w - 1].used == WHITE) format_output("a white peg.\n",0); if (guesses[z - 1].pegs[w - 1].used == NONE) format_output("no peg.\n",0); skipline(1); }