Skip to content

Comments

Will Baxter#204

Open
MrStashy wants to merge 7 commits intoboolean-uk:mainfrom
MrStashy:main
Open

Will Baxter#204
MrStashy wants to merge 7 commits intoboolean-uk:mainfrom
MrStashy:main

Conversation

@MrStashy
Copy link

No description provided.

Comment on lines +1 to +5
const letterScores = {
a: 1, b: 3, c: 3, d: 2, e: 1, f: 4, g: 2, h: 4, i: 1,
j: 8, k: 5, l: 1, m: 3, n: 1, o: 1, p: 3, q: 10, r: 1,
s: 1, t: 1, u: 1, v: 4, w: 4, x: 8, y: 4, z: 10,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Potential solution

const letterScores = {
  '1': ['a', 'e']
}

}

const scrabble = word => {

Copy link
Contributor

Choose a reason for hiding this comment

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

Random white space

Comment on lines +10 to +14
let lowerCaseWord = word.toLowerCase()
let totalLetterScore = calculateLetterScores(lowerCaseWord)
let doubleWordScore = determineDoubleWord(lowerCaseWord)
let tripleWordScore = determineTripleWord(lowerCaseWord)
let totalScore = calculateFinalScore(totalLetterScore, doubleWordScore, tripleWordScore)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be const

Comment on lines +16 to +18
} else {
return 0
}
Copy link
Contributor

Choose a reason for hiding this comment

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

if (!validWordCheck(word)) {
  return 0
}

const one = ...

Comment on lines +27 to +29
if (word === null) {
return false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

if (!word)

}

for (let i = 0; i < word.length; i++) {

Copy link
Contributor

Choose a reason for hiding this comment

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

Random white space

return false
}
}
if (frontBraceCount !== backBraceCount || frontSquareCount !== backSquareCount) {
Copy link
Contributor

@vherus vherus Feb 29, 2024

Choose a reason for hiding this comment

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

return frontBraceCount !== backBraceCount || frontSquareCount !== backSquareCount

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