Skip to content

Add a better pattern for each problem #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ignacio-chiazzo opened this issue Nov 5, 2018 · 0 comments
Closed

Add a better pattern for each problem #11

ignacio-chiazzo opened this issue Nov 5, 2018 · 0 comments

Comments

@ignacio-chiazzo
Copy link
Owner

Create a better pattern for problems:

  • Make sure each object implements its main function and export it.
  • Don't stop the main if any of the classes didn't implement the function
  • Put a warning with red letters whenever a problem wasn't added a main function
  • Fail test if a class doesn't implement main function an export it?

Create a structure for every problem like this? :

/* 
@param {string} a
@param {number} b
*/

var problemName = function(a,b...) {...}

var testCases = function() {
    console.log(problemName(...));
}

var main = function() {
   // print  something useful if needed
   testCases();
}

module.exports.main = main;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant