Skip to content

Conversation

@GormanGit
Copy link
Owner

Checkpoint Rubric

This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.

Checkpoint 1

  • All tests passed: 40 points
  • Proper use of documentation (commenting on code): 15 points
  • Properly indented code: 15 points
  • Demonstrated effective use of JavaScript: 30 points

Checkpoint 2

  • The application works as it should: 40 points
  • Proper use of documentation (commenting on code): 15 points
  • Properly indented code: 15 points
  • Demonstrated effective use of JavaScript and the DOM API: 30 points

Checkpoint 3

  • Use of React: 25 points
  • Accesses an API: 25 points
  • Proper use of documentation (commenting on code): 25 points
  • The application functions as it should: 25 points

Copy link

@stu-k stu-k left a comment

Choose a reason for hiding this comment

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

You understood how the tests functioned in 'should detect which hand won', but you didn't implement that in 'should check for unassigned words'. Additionally, your last else if in the rps function is incorrect. Please meet with me before class or during office hours and we can go over your code! Also, please do not edit code unrelated to the homework on the same branch (01week/rockPaperScissors.js).

assert.equal(rockPaperScissors('paper', 'paper'), "It's a tie!");
assert.equal(rockPaperScissors('scissors', 'scissors'), "It's a tie!");
});
it('should detect which hand won', () => {
Copy link

Choose a reason for hiding this comment

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

Very nice, you've tested for all possible win cases!

02week/tests.js Outdated
//Check for player two win
} else if (hand1 === 'rock' && hand2 === 'paper' || hand1 === 'paper' && hand2 === 'scissors' || hand1 === 'scissors' && hand2 === 'rock') {
return "Hand two wins!"
}else if (hand1 && hand2 !== 'rock', 'paper', 'scissors'){
Copy link

@stu-k stu-k Oct 19, 2017

Choose a reason for hiding this comment

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

This is not how you check if hand1 and hand2 are not equal to rock or paper or scissors. It will probably throw an error.

02week/tests.js Outdated
assert.equal(rockPaperScissors('rock ', 'sCiSsOrs'), "Hand one wins!");
});
it('shoulde check for unassigned words', () => {
assert.notEqual(rockPaperScissors('rock, paper, scissors', 'rock, paper, scissors'), "You are not playing the game right!");
Copy link

@stu-k stu-k Oct 19, 2017

Choose a reason for hiding this comment

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

You're passing in two identical strings, which will return "It's a tie!", then asserting that the return is NOT equal to "You are not playing the game right". This test will always pass.

Copy link

@stu-k stu-k left a comment

Choose a reason for hiding this comment

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

Yay! You fixed the things! Everything looks good. Despite that fact, please do not merge, because of all the file changes and whatever. So 100%! But don't merge :D

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.

4 participants