|
|
@ -33,13 +33,11 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
function checkIsEnd() {
|
|
|
|
function checkIsEnd() {
|
|
|
|
console.log("checkIsEnd");
|
|
|
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=getGameEtat', true);
|
|
|
|
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=getGameEtat', true);
|
|
|
|
xhr.responseType = 'text';
|
|
|
|
xhr.responseType = 'text';
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
xhr.onload = function () {
|
|
|
|
xhr.onload = function () {
|
|
|
|
console.log(xhr.responseText);
|
|
|
|
|
|
|
|
if (xhr.responseText == "2") {
|
|
|
|
if (xhr.responseText == "2") {
|
|
|
|
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=endGame'
|
|
|
|
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=endGame'
|
|
|
|
}
|
|
|
|
}
|
|
|
|