From 8355a75c9931c10787d8f048775be7e225608c29 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Tue, 29 Nov 2016 18:51:32 +0100 Subject: [PATCH] Tron down to 100X100, My CPU is happy --- src/arenas/tron/Coords.php | 2 +- src/arenas/tron/TronGame.php | 4 ++-- src/arenas/tron/doc-en.html | 4 ++-- src/arenas/tron/doc-fr.html | 4 ++-- src/arenas/tron/js.js | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/arenas/tron/Coords.php b/src/arenas/tron/Coords.php index 9fdb5e4..dbb8c29 100755 --- a/src/arenas/tron/Coords.php +++ b/src/arenas/tron/Coords.php @@ -1,7 +1,7 @@ The game ends when there are less than two snakes left

Grid

Communications between the arena and the bots

diff --git a/src/arenas/tron/doc-fr.html b/src/arenas/tron/doc-fr.html index eeeabe5..cf700d8 100755 --- a/src/arenas/tron/doc-fr.html +++ b/src/arenas/tron/doc-fr.html @@ -34,8 +34,8 @@

Le jeu prend fin lorsqu'il reste moins de deux serpents.

La grille

Communications entre l'arène et les bots

diff --git a/src/arenas/tron/js.js b/src/arenas/tron/js.js index 54f52e1..7ce82c5 100755 --- a/src/arenas/tron/js.js +++ b/src/arenas/tron/js.js @@ -90,7 +90,7 @@ function drawMap(map){ for (var botId in map){ if(typeof(map[botId]['x']) != 'undefined'){ //don't draw deads bots //draw the point - var rect=createElemNS('rect',{'x':map[botId]['x'],'y':map[botId]['y'],'width':'2','height':'2','style':'fill:' + botsColor[botId] + ';'}); + var rect=createElemNS('rect',{'x':map[botId]['x'],'y':map[botId]['y'],'width':'1','height':'1','style':'fill:' + botsColor[botId] + ';'}); document.getElementById('map').appendChild(rect); } } @@ -159,7 +159,7 @@ function tron(xd_check){ document.getElementById('fightResult').removeChild(document.getElementById('fightResult').firstChild); } // draw border; - var svg = createElemNS('svg',{'id':'map','width':'500','height':'500','viewBox':'0 0 1000 1000'}); + var svg = createElemNS('svg',{'id':'map','width':'500','height':'500','viewBox':'0 0 100 100'}); var rect=createElemNS('rect',{'x':'0','y':'0','width':'1000','height':'1000','style':'stroke:#000000; fill:none;'}); svg.appendChild(rect); document.getElementById("fightResult").appendChild(svg);