This commit is contained in:
parent
7d2588f7cd
commit
3abdb6910e
@ -97,7 +97,18 @@
|
||||
},
|
||||
|
||||
initialize: function (data) {
|
||||
if (data.history) {
|
||||
if (data.history.length === 0 && !data.place) {
|
||||
var div = document.getElementById('players');
|
||||
|
||||
for (var i = 0; i < data.members.length; ++i) {
|
||||
var member = data.members[i];
|
||||
|
||||
var p = document.createElement('p');
|
||||
p.innerHTML = member.userName + (member.me ? ' (me)' : '');
|
||||
div.appendChild(p);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.history.length; ++i) {
|
||||
var round = data.history[i];
|
||||
Game.rounds.push({ position: round.position, guessPosition: round.result.guessPosition, realMarker: null, guessMarkers: [] });
|
||||
@ -115,7 +126,6 @@
|
||||
|
||||
document.getElementById('currentRound').innerHTML = String(Game.rounds.length) + '/' + String(Game.NUMBER_OF_ROUNDS);
|
||||
document.getElementById('currentScoreSum').innerHTML = String(Game.scoreSum) + '/' + String(Game.rounds.length * Game.MAX_SCORE);
|
||||
}
|
||||
|
||||
if (data.timeout) {
|
||||
Game.startCountdown(data.timeout);
|
||||
@ -133,16 +143,6 @@
|
||||
}
|
||||
|
||||
document.getElementById('loading').style.visibility = 'hidden';
|
||||
|
||||
var div = document.getElementById('players');
|
||||
|
||||
for (var i = 0; i < data.members.length; ++i) {
|
||||
var member = data.members[i];
|
||||
|
||||
var p = document.createElement('p');
|
||||
p.innerHTML = member.userName + (member.me ? ' (me)' : '');
|
||||
div.appendChild(p);
|
||||
}
|
||||
},
|
||||
|
||||
memberJoined: function (data) {
|
||||
@ -253,8 +253,6 @@
|
||||
|
||||
initialize: function () {
|
||||
document.getElementById('panoCover').style.visibility = 'visible';
|
||||
document.getElementById('currentRound').innerHTML = '1/' + String(Game.NUMBER_OF_ROUNDS);
|
||||
document.getElementById('currentScoreSum').innerHTML = '0/0';
|
||||
|
||||
Game.map.setOptions({
|
||||
draggableCursor: 'crosshair'
|
||||
@ -279,7 +277,6 @@
|
||||
Game.panoId = this.response.place.panoId;
|
||||
Game.pov = this.response.place.pov;
|
||||
|
||||
if (this.response.history) {
|
||||
for (var i = 0; i < this.response.history.length; ++i) {
|
||||
var round = this.response.history[i];
|
||||
Game.rounds.push({ position: round.position, guessPosition: round.result.guessPosition, realMarker: null, guessMarkers: [] });
|
||||
@ -290,7 +287,6 @@
|
||||
|
||||
document.getElementById('currentRound').innerHTML = String(Game.rounds.length) + '/' + String(Game.NUMBER_OF_ROUNDS);
|
||||
document.getElementById('currentScoreSum').innerHTML = String(Game.scoreSum) + '/' + String(Game.rounds.length * Game.MAX_SCORE);
|
||||
}
|
||||
|
||||
Game.startNewRound();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user