-
Notifications
You must be signed in to change notification settings - Fork 20
AC2 - Larissa Ault #22
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
base: main
Are you sure you want to change the base?
Conversation
…pdating alphabet object when letters drawn
| }; | ||
| } | ||
|
|
||
| decreaseLetterCount(letter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this!
| @@ -1,15 +1,71 @@ | |||
| import { Alphabet } from "./modules/Alphabet.js"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way to go, breaking your code in to separate files!
| // collect index of letter | ||
| const index = handArr.indexOf(letter); | ||
| // remove letter from copy of letters in hand - prevent duplication | ||
| handArr.splice(index, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice use of splice for the removal
| export const usesAvailableLetters = (input, lettersInHand) => { | ||
| // Implement this method for wave 2 | ||
| // convert input string to array | ||
| const inputArr = [...input.toUpperCase()]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cue gwen stefanni!
(nice use of spread syntax :) )
| @@ -0,0 +1,47 @@ | |||
| export class Alphabet { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, loving the modularization!
| @@ -0,0 +1,16 @@ | |||
| import { Alphabet } from "./Alphabet"; | |||
|
|
|||
| export class Hand extends Alphabet { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOP!
No description provided.