Skip to content

Conversation

@emindeniz99
Copy link

No description provided.

score = 0
level = 0
lineCounter = 0
basePoints = [40, 100, 300, 1200]
Copy link
Collaborator

Choose a reason for hiding this comment

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

A very good and clean solution in general but it fails when the player doesn't clear any line and we have "0" in our input array. In the instructions, the input range is given from 0 to 4. You seem to have ignored the "0" part also in your tests. ; ) Can you please edit your function and push it again?

describe("scores", function () {
test("should get correct answer", function () {
expect(get_score([4, 2, 2, 3, 3, 4, 2])).toEqual(4900)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be secure with your solution try adding several cases in your tests, especially the tricky ones. ; )

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