Global

Members

(constant) Answers :string

Enum Answers values
Type:
  • string
Properties:
Name Type Description
Correct string this message get send when the challenger submit the correct answer.
Wrong string this message get send when the challenger submit the wrong string answer.
Lower string this message get send when the challenger submit lower number as an answer.
Higher string this message get send when the challenger submit higher number as an answer.
Source:

Challenges :ChallengesT

list of challenges plugged
Type:
Source:

imported :boolean

if the challenge is plugged or not
Type:
  • boolean
Source:

Methods

GetChallenge(dayopt, mainopt) → {undefined|Challenge}

Get the challenge using the day and the type of the challenge (main/side)
Parameters:
Name Type Attributes Default Description
day Number <optional>
1 this number represents day of the challenge
main Boolean <optional>
true this boolean represents if the challenge is main or not(side)
Source:
Throws:
throws an error if couldn't get the challenge or the challenges aren't plugged yet.
Type
NoChallenge
Returns:
the challenge of the day with its type requested if the challenges has been imported;
Type
undefined | Challenge

plugChallenges(challenges)

This function plug the challenges that has been declared out of this package
Parameters:
Name Type Description
challenges ChallengesT the challenges to be plugged
Source:

Type Definitions

ChallengesT

list of challenges (main/side)
Type:
  • object
Properties:
Name Type Description
main Array.<Challenge> list of the main challenges
side Array.<Challenge> list of the side challenges
Source:

I_O

the inputs and the output of the challenge to be set if its already generated.
Type:
  • object
Properties:
Name Type Attributes Description
inputs Array.<any> <optional>
the inputs of the challenge to be set if its already generated.
output NS <optional>
the output of the challenge to be set if its already generated.
Source:

NS

Type:
  • Number | String
Source:

Result

Type:
  • object
Properties:
Name Type Description
message Answers a message to be sent to the challenger so he can understand the result
result boolean a boolean to be sent with the message so it helps the client renderer to show the message correctly
Source: