-
Notifications
You must be signed in to change notification settings - Fork 0
#tight-wallaroo 176: Core Vanilla Javascript [Team Drills & Practice] #5
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
base: master
Are you sure you want to change the base?
Conversation
| // | ||
| // This is only a SKELETON file for the "Sudoku" exercise. It's been provided as a | ||
| // convenience to get you started writing code faster. | ||
| // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment?
| }; | ||
|
|
||
| Sudoku.prototype.isSolved = function() { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no logic in this function.
| }); | ||
|
|
||
| it('recognizes a solved board as solved', function() { | ||
| xit('recognizes a solved board as solved', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isSolved function is empty. How does this test work with an empty function? Did you write the tests first and then plan on implementing functionality? I can appreciate that if that's the case. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests came with the project and the ones x'd out (xit) are things that aren't yet implemented
| "eslint-plugin-standard": "^2.0.1" | ||
| }, | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've written tests for your Sudoku code but I'm unable to test because there's no test script. How did you run your tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project is set up for running the tests by going into each exercism folder and running jasmine-node . -- it was very confusing for me, too
|
|
||
| }; | ||
|
|
||
| Sudoku.prototype.solve = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method solve is doing too much, and not just solving the game. It occurs to me that you might create a function along the lines of initializeBoard to create a new gameboard, takeUserInput to allow players to play the game.
| } | ||
| }) | ||
|
|
||
| //check if a space's row & column contain all numbers 1-9 already |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic comments might be removed.
| let wholeBoxNine = boxNineRowOne.concat(boxNineRowTwo).concat(boxNineRowThree) | ||
| checkBox(wholeBoxNine) | ||
|
|
||
| console.log(boardArray) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need the console.log? Do they contribute to the functionality or were they just for testing purposes?
| @@ -0,0 +1,15 @@ | |||
| var Bob = function() {}; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a constructor function?
| let diamondLimit = alphabet.slice(0, alphabet.indexOf(letter)+1).split('') | ||
| let diamondArray = [] | ||
|
|
||
| // for (let i = 0; i < alphabet.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
No description provided.