Package me.nickhanson.codeforge.service
Class ChallengeRunService
java.lang.Object
me.nickhanson.codeforge.service.ChallengeRunService
Service class responsible for running and evaluating code submissions
against coding challenges using predefined heuristics.
- Author:
- Nick Hanson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEvaluates submitted code for a given challenge using a default mode.runWithMode(String mode, Long challengeId, String language, String code) Internal method to evaluate code with a specified mode for telemetry.
-
Constructor Details
-
ChallengeRunService
public ChallengeRunService()
-
-
Method Details
-
run
Evaluates submitted code for a given challenge using a default mode.Delegates to
runWithMode(String, Long, String, String)with "unknown" as the mode.- Parameters:
challengeId- The ID of the challenge being evaluated.language- The programming language of the submitted code.code- The submitted code as a string.- Returns:
- A RunResult object representing the outcome of the evaluation.
-
runWithMode
Internal method to evaluate code with a specified mode for telemetry.- Parameters:
mode- The mode of the run (e.g., "test", "submit").challengeId- The ID of the challenge being evaluated.language- The programming language of the submitted code.code- The submitted code as a string.- Returns:
- A RunResult object representing the outcome of the evaluation.
-