Package dev.zemco.codegame.evaluation
Interface IEvaluationService
- All Known Implementing Classes:
EvaluationService
public interface IEvaluationService
Service that manages business logic related to evaluation of solutions of
problems
created by the player.- Author:
- Erik Zemčík
-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluateSolutionOnAllProblemCases(Program solution, Problem problem) getEvaluatorForProblemCaseSolution(Program solution, ProblemCase problemCase)
-
Method Details
-
evaluateSolutionOnAllProblemCases
- Parameters:
solution- solution program to evaluateproblem- problem to evaluate against- Returns:
- true if the solution has passed all the problems cases, else false
- Throws:
IllegalArgumentException- ifsolutionisnullor ifproblemisnull
-
getEvaluatorForProblemCaseSolution
Provides anevalutorfor the solutionprogramagainst the given specificproblem case. This approach is recommended when the state of the underlying execution needs to be observed during the evaluation.- Parameters:
solution- solution program to evaluateproblemCase- problem case to evaluate against- Returns:
- evaluator for the given problem case
- Throws:
IllegalArgumentException- ifsolutionisnullor ifproblemCaseisnull
-