I just had a game where it appeared to start, but then it suddenly went to the Table view instead. After I reloaded, it went back to the game.
SMF - Just Installed!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu key: "createUniqueInitials",
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;
}
if (players.length > 1 && players[players.length - 2].name.length === previousPrefix) previousPrefix += 1;
players[players.length - 1].initials = players[players.length - 1].name.slice(0, previousPrefix);
players.sort(function (a, b) {
return a.index - b.index;
});
}