Playable maps
= $map['description'] ?>
diff --git a/public/static/js/game.js b/public/static/js/game.js index 8ccb9b2..00f0489 100644 --- a/public/static/js/game.js +++ b/public/static/js/game.js @@ -53,7 +53,7 @@ Core.startNewRound(); }; - xhr.open('GET', 'position.json?map=' + mapId, true); + xhr.open('GET', '/game/' + mapId + '/position.json', true); xhr.send(); }, @@ -135,7 +135,7 @@ Core.resetGame(); }; - xhr.open('GET', 'game.json?map=' + mapId, true); + xhr.open('GET', '/game/' + mapId + '/position.json', true); xhr.send(); }, @@ -160,7 +160,6 @@ document.getElementById('cover').style.visibility = 'visible'; var data = new FormData(); - data.append('guess', '1'); data.append('lat', String(guessPosition.lat)); data.append('lng', String(guessPosition.lng)); @@ -209,7 +208,7 @@ Core.panoId = this.response.panoId; }; - xhr.open('POST', 'position.json?map=' + mapId, true); + xhr.open('POST', '/game/' + mapId + '/guess.json', true); xhr.send(data); }, diff --git a/views/game.php b/views/game.php index 5732766..05f6157 100644 --- a/views/game.php +++ b/views/game.php @@ -1,9 +1,9 @@ - +
= $map['description'] ?>