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 Details

    • evaluateSolutionOnAllProblemCases

      boolean evaluateSolutionOnAllProblemCases(Program solution, Problem problem)
      Evaluates player's solution program against all of the problem cases of the given problem.
      Parameters:
      solution - solution program to evaluate
      problem - problem to evaluate against
      Returns:
      true if the solution has passed all the problems cases, else false
      Throws:
      IllegalArgumentException - if solution is null or if problem is null
    • getEvaluatorForProblemCaseSolution

      ISolutionEvaluator getEvaluatorForProblemCaseSolution(Program solution, ProblemCase problemCase)
      Provides an evalutor for the solution program against the given specific problem case. This approach is recommended when the state of the underlying execution needs to be observed during the evaluation.
      Parameters:
      solution - solution program to evaluate
      problemCase - problem case to evaluate against
      Returns:
      evaluator for the given problem case
      Throws:
      IllegalArgumentException - if solution is null or if problemCase is null