diff --git a/src/arenas/tron/js.js b/src/arenas/tron/js.js index 24cf07d..489740b 100644 --- a/src/arenas/tron/js.js +++ b/src/arenas/tron/js.js @@ -13,10 +13,14 @@ function createElemNS(type,attributes){ function tron(bot1,bot2,xdcheck){ + //empty + while (document.getElementById('fightResult').firstChild) { + document.getElementById('fightResult').removeChild(document.getElementById('fightResult').firstChild); + } + // draw border; + var svg = createElem('svg',{'id':'map','width':'1000','height':'1000'}); + var rect=createElemNS('rect',{'x':'0','y':'0','width':'1000','height':'1000','style':'stroke:#000000; fill:none;'}); + svg.appendChild(rect); - //var svgDoc = svg.contentDocument; - var rect=createElemNS('rect',{'x':'10','y':'10','width':'50','height':'80','style':'stroke:#000000; fill:none;'}); - - document.getElementById("map").appendChild(rect); - + document.getElementById("fightResult").appendChild(svg); } diff --git a/src/arenas/tron/public.php b/src/arenas/tron/public.php index 1ceb7ca..e6f3618 100644 --- a/src/arenas/tron/public.php +++ b/src/arenas/tron/public.php @@ -34,7 +34,6 @@ $bots=get_Bots_Array('tron');
- + + \ No newline at end of file