try to draw 1000*1000 svg grig
This commit is contained in:
parent
2a8fc385e2
commit
41467e8ab5
|
@ -12,9 +12,9 @@ function createElemNS(type,attributes){
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyInitMessage(request){
|
function applyInitMessage(req){
|
||||||
if(request.readyState == 4){
|
if(req.readyState == 4){
|
||||||
if(request.status == 200) {
|
if(req.status == 200) {
|
||||||
alert ("ok");
|
alert ("ok");
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
@ -37,8 +37,8 @@ function tron(bot1,bot2,xd_check){
|
||||||
document.getElementById("fightResult").appendChild(svg);
|
document.getElementById("fightResult").appendChild(svg);
|
||||||
|
|
||||||
//ask arena to send bots init messages
|
//ask arena to send bots init messages
|
||||||
var request = new XMLHttpRequest(request);
|
var request = new XMLHttpRequest();
|
||||||
request.onreadystatechange = applyInitMessage;
|
request.onreadystatechange = applyInitMessage(request);
|
||||||
request.open("POST", '/tron', true);
|
request.open("POST", '/tron', true);
|
||||||
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||||
request.send('act=initGame&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check + '&fullLogs=' + document.getElementById("fullLogs").checked);
|
request.send('act=initGame&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check + '&fullLogs=' + document.getElementById("fullLogs").checked);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user