//-------------------------------------------------------------------------------------------------------------------- // Define the interface to the player task for the telephone game. //-------------------------------------------------------------------------------------------------------------------- _Task Player { int &gameOver; // Location of value which indicates the game is over. int id; // Identity of player Player *nextPlayer; // Identity of next player in circle. char *message; // Message being passed around the ring. void main(); // Main body of task. void perturbMessage(); // Randomly perturbs the message. public: Player(int &newgameOver, Player *next, int whoami) : gameOver(newgameOver), nextPlayer(next), id(whoami) {} void SetPlayer(Player *next) { nextPlayer = next;} // Sets id of next player. void SendMessage(char *m); // Transfers message over. };