Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No one with same problems after five months?
Don't know if there is an issue in JS. I see 195 has completed the kata in JS so i guess i'm skipping something.
Case 1: Some times, i correctly get 'Game Over!' several plays but seems that game restart at some point. Instructions does not inform about restarting game.
Case 2: Some times, test does not take in consideration double die
Player 1 takes 1 and 4
Player 1 before move is at: 97
Player 1 after move is at: 98
Test Passed: Value == 'Player 1 is on square 98'
Log
Player 2 takes 1 and 1
Player 2 before move is at: 75
Player 2 after move is at: 77
Test Passed: Value == 'Player 2 is on square 77'
Log
Player 2 takes 6 and 3
Player 2 before move is at: 77
Player 2 after move is at: 86
Should return: Player 1 is on square 9 - Expected: 'Player 1 is on square 9', instead got: 'Player 2 is on square 86'
As you see, player 2 takes dobles 1, so he should play again, but test expected player 1 to play.
Case 3: Game suddenly restarts with no winners???
Log
Player 1 takes 4 and 5
Player 1 before move is at: 84
Player 1 after move is at: 93
Test Passed: Value == 'Player 1 is on square 93'
Log
Player 2 takes 3 and 4
Player 2 before move is at: 86
Player 2 after move is at: 93
Test Passed: Value == 'Player 2 is on square 93'
Log
Player 1 takes 5 and 6
Player 1 before move is at: 93
Player 1 after move is at: 96
Should return: Player 1 is on square 11 - Expected: 'Player 1 is on square 11', instead got: 'Player 1 is on square 96'
Here, player 1 should bounce, but it seems to begin again from 0
Nice to stop the loop if necessary ;)
Did similar using while to stop the loop
This comment is hidden because it contains spoiler information about the solution
Taking first word as the shortest word (it's correct) you can skip the first loop iteration initializing i as '1' instead of '0'. Now you're comparing the first word with itself.
This comment is hidden because it contains spoiler information about the solution
The good thing about using objects in JS, is that you can use it as a map. Name atributes in your object will be the 'key' of the map.