Skip to content

Lauren Cardella -- Carets#35

Open
enigmagnetic wants to merge 6 commits into
Ada-C8:masterfrom
enigmagnetic:master
Open

Lauren Cardella -- Carets#35
enigmagnetic wants to merge 6 commits into
Ada-C8:masterfrom
enigmagnetic:master

Conversation

@enigmagnetic

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 some methods like array.push to add an element to an array, just like in Ruby. Also, the method for defining and throwing custom exceptions was very similar.
What was a challenge you were able to overcome on this assignment? One challenge was nesting conditionals to achieve the same functionality that Enumerable would accomplish in Ruby, especially when accessing an object.
What is your favorite thing about learning a new programming language? It is interesting to see which concepts carry over cleanly and how some of the underlying mechanisms are totally different. Being able to apply concepts I already know in a new context makes me a more flexible programmer.
What is your least favorite thing about learning a new programming language? It's a bit tedious in the early stages when you have to look up every single thing.
Do you have any recommendations on how we could improve this project for the next cohort? I'm not sure about improvements, but I didn't understand why the Player class was defined like 'Scrabble.Player = class {}' instead of 'class Player = {}'. Is there a reason to choose one over the other?

@CheezItMan

Copy link
Copy Markdown

JS Scrabble

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene A few more granular commits would be better.
Comprehension questions One reason to declare Player like that is to namespace it. So the Player class uses Scrabble as a module.
General
score calculates score, has appropriate params and return value Check
highestScoreFrom calculates highest scoring word, has appropriate params and return value Check
Player object
Has name and plays properties Check
Has play, totalScore, hasWon functions Check
Has highestScoringWord and highestWordScore functions Check
Overall Nice work you hit all the requirement. The way you used the SCORES object was backwards from what I would do, but it worked well. I like how you used the destructor for the highestScoreFrom.

Comment thread scrabble.js
wordArray.map(function(word) {
wordScores[word] = Scrabble.score(word);
});
const highScore = Math.max(...Object.values(wordScores));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work using map & Math.max as well as a destructor!

Comment thread scrabble.js
if (this.plays.length < 1) {
return total;
}
for (let word of this.plays) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can also use reduce.

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