示例#1
0
        public static double FindSingleHerbivoryDifference(UserGuessModel guess)
        {
            var calc = (double)(guess.GuessPercentage - guess.Image.DecayRate);
            var dif  = calc < 0 ? calc * -1 : calc;

            return(dif);
        }
示例#2
0
        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));
        }