Seeing this happen again:
Upon entering this function, the array `this.game.state.players` contains two elements.
this.game.state.players[0].name = undefined
this.game.state.players[1].name = "Dwedit"
Then it crashes when it attempts to sort the players, and the game never starts.
---
It is actually possible to manually get past this one:
* Set a JavaScript breakpoint at the `var players = this.game.state.players;` line
* Go to Console, and assign `this.game.state.players[0].name = "OPPONENT"` (if players[0] was the one without a name)
* Resume execution
When I finally got past it, I saw a "make opponent resign" prompt. The opponent was probably was having issues too.
Code Select
value: function createUniqueInitials() {
var players = this.game.state.players;
players.sort(function (a, b) {
return a.name.localeCompare(b.name);
});
var previousPrefix = 1;
for (var i = 0; i < players.length - 1; i++) {
var prefix = 1;
for (; prefix < players[i].name.length; prefix++) {
if (players[i].name[prefix - 1].toLowerCase() !== players[i + 1].name[prefix - 1].toLowerCase()) break;
}
players[i].initials = players[i].name.slice(0, Math.max(previousPrefix, prefix));
previousPrefix = prefix;
}
Upon entering this function, the array `this.game.state.players` contains two elements.
this.game.state.players[0].name = undefined
this.game.state.players[1].name = "Dwedit"
Then it crashes when it attempts to sort the players, and the game never starts.
---
It is actually possible to manually get past this one:
* Set a JavaScript breakpoint at the `var players = this.game.state.players;` line
* Go to Console, and assign `this.game.state.players[0].name = "OPPONENT"` (if players[0] was the one without a name)
* Resume execution
When I finally got past it, I saw a "make opponent resign" prompt. The opponent was probably was having issues too.