Skip to content

lauren pipes scrabble#46

Open
laurenelee wants to merge 11 commits into
Ada-C8:masterfrom
laurenelee:master
Open

lauren pipes scrabble#46
laurenelee wants to merge 11 commits into
Ada-C8:masterfrom
laurenelee:master

Conversation

@laurenelee

Copy link
Copy Markdown

JS Scrabble

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What patterns were you able to use from your Ruby knowledge to apply to JavaScript? I was able to use similar nested if-loops to check against the tie scenarios. The same logic applied to most everything in this problem, I just needed to switch syntax. It was the same pattern of checking the first word in the array against the next and evaluating it.
What was a challenge you were able to overcome on this assignment? I struggled with understanding when to call 'this' and when to call the object 'Scrabble'. I also wanted to DRY up my checkValidity function that I call twice and I overcame that tricky spot but pulling out completely and making it more of a 'globally scoped' function.
What is your favorite thing about learning a new programming language? I am loving that the translation portion of it and it has been fun to revel in the differences. It's neat that JS doesn't have the same functionality as ruby and now we are in the exploration phase of what those differences and similarities are. It's proving to be pretty fun and fascinating!
What is your least favorite thing about learning a new programming language? Syntax confusion. Not quite knowing how to search for what I am needing on the internet. But I'm sure this is normal and is just my own growing-pains that will get better with time and effort.
Do you have any recommendations on how we could improve this project for the next cohort? I wonder if we could have used two classes as opposed to an object and class within that object. Just because it was what we had been working on in class on Tuesday it would have been fun to apply that new knowledge!

@droberts-sea

Copy link
Copy Markdown

JS Scrabble

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene yes
Comprehension questions yes
General
score calculates score, has appropriate params and return value yes
highestScoreFrom calculates highest scoring word, has appropriate params and return value yes
Player object
Has name and plays properties yes
Has play, totalScore, hasWon functions yes
Has highestScoringWord and highestWordScore functions yes
Overall Great work overall!

Comment thread scrabble.js
highestWord = word;
} else if (highestWord.length === 7) {
} else if (word.length < highestWord.length) {
highestWord = word;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This block of code is pretty dense. It might help readability to use empty lines to break things up. Also, you've got a clause on your if statement with no code - I will typically leave a comment in this case, to reassure whoever comes next that I didn't just forget to write something there. Something like

} else if (highestWord.length === 7) {
  // Keep highestWord (no-op)

} else if ...

Comment thread scrabble.js
let letter = word.toLowerCase().split("");
letter.forEach(function(char) {
checkValidity(char);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since you later call .score() on the word, I don't think you need a separate validity check here.

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

Successfully merging this pull request may close these issues.

2 participants