/* File: test.c
Programmer: Tep Dobry
login: tep
Date:
*/
/* This module is responsible for testing the user guess and
giving the appropriate feedback.
*/
#include "play.h"
int test(int picked, int guessed)
/* This function tests the players guess.
Given: the pick and the guess
Return: win, high or low
*/
{
/* If the guess matches the pick */
if( guessed == picked )
/* return win! */
return WIN;
/* Otherwise if the guess is too low */
if( guessed < picked )
/* return low */
return LOW;
/* Otherwise if the guess is too high */
/* return high */
return HI;
}