Skip to content

Ampers - Sara S#31

Open
CheerOnMars wants to merge 5 commits into
Ada-C9:masterfrom
CheerOnMars:master
Open

Ampers - Sara S#31
CheerOnMars wants to merge 5 commits into
Ada-C9:masterfrom
CheerOnMars:master

Conversation

@CheerOnMars

@CheerOnMars CheerOnMars commented May 18, 2018

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? The patterns I've noticed most were adding
What was a challenge you faced in this assignment? Besides keeping track of () and {}, it took some thinking through to get my head around 'this.'
Do you have any recommendations on how we could improve this project for the next cohort?

@CheezItMan

Copy link
Copy Markdown

JS Scrabble

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene You should have more commits. The commit messages are good.
Comprehension questions Check, it' normal to have issues with this.
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 Well done you hit all the learning goals, well done!

Comment thread scrabble.js
let letters = word.toUpperCase().split(``);

if (word.match(/^[a-zA-Z]{1,7}$/) == null) {
throw `How'd you get a non-letter tile, even?`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:)

Comment thread scrabble.js
}

hasWon() {
if (this.totalScore() >= 100) {

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 could also simply

return this.totalScore() >= 100;

Comment thread specs/scrabble.spec.js


test('returns false when score < 100', () => {
const player = new Scrabble.Player('test player');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It would be good to loop through until you reach 99, the edge case, and verify that hasWon() is false.

Comment thread specs/scrabble.spec.js


test('returns true when score > 100', () => {
const player = new Scrabble.Player('test player');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It would also be good to verify that 101 makes hasWon() true

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