Skip to content

Conversation

@ctlaultdel
Copy link

No description provided.

};
}

decreaseLetterCount(letter) {

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";

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);

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()];

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 {

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 {

Choose a reason for hiding this comment

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

OOP!

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