public static double FindSingleHerbivoryDifference(UserGuessModel guess) { var calc = (double)(guess.GuessPercentage - guess.Image.DecayRate); var dif = calc < 0 ? calc * -1 : calc; return(dif); }
public HttpResponseMessage UserGuess([FromBody] UserGuessModel userGuess) { User u = new User(userGuess.UserName); EnumFeedback[] result = MasterMindGameHandler.UserGuess(userGuess.GameName, u, userGuess.GameColorsCodes); return(Request.CreateResponse(HttpStatusCode.OK, result)); }