Skip to content
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

Briana Eng - Scrabble #29

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Briana Eng - Scrabble #29

wants to merge 6 commits into from

Conversation

brianaeng
Copy link

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall nice job Briana. I like in particular how you used a Javascript object as essentially a Hash to score words.

I did put a comment here about an overly complicated method. Think about how you can simplify it a bit. I think I remember your Ruby Scrabble being similarly complicated.

return 'hello world!';
var Scrabble = function() {
this.score = function(word) {
var cases = {A: 1, E: 1, O: 1, U: 1, L: 1, N: 1, R: 1, S: 1, T: 1, D: 2, G: 2, B: 3, C: 3, M: 3, P: 3, F: 4, H: 4, V: 4, W: 4, Y: 4, K: 5, J: 8, X: 8, Q: 10, Z: 10};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of a JavaScript object as a Hash, exactly as I did it!

}

return winningWord;
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a little complicated. Couldn't you just use 1 loop with an if statement inside?

console.log("Should print z - same score, shorter word");
var bestWord2 = anotherGame.highestScoreFrom(["z", "kk"]);
console.log(bestWord2);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work testing the functions.

@@ -0,0 +1,126 @@
//WAVE 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why separate file for prototypes?

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

Successfully merging this pull request may close these issues.

3 participants