diff --git a/src/arenas/tron/js.js b/src/arenas/tron/js.js index 4f5d245..d96a5d2 100644 --- a/src/arenas/tron/js.js +++ b/src/arenas/tron/js.js @@ -11,6 +11,22 @@ function createElemNS(type,attributes){ {elem.setAttributeNS(null,i,attributes[i]);} return elem; } +function show_bot_panel(number){ + //configurePlayers + var fieldset = createElem('fieldset',{'class':'botFormulaire'}); + var p=createElem('p'); + var select = createElem('select',{'id':'selectBot' + number, 'onchange':'changeSelect(this.value);'}); + for each (var bot in botsAvailable){ + var option = createElem('option',{'value':bot['id']}); + option.innerHTML = bot['name']; + select.appendChild(option); + } + p.appendChild(select); + fieldset.appendChild(p); + + + document.getElementById('configurePlayers').appendChild(fieldset); +} function applyInitMessage(req){ //callback function when init game request diff --git a/src/arenas/tron/public.php b/src/arenas/tron/public.php index d5a4302..3dfa844 100644 --- a/src/arenas/tron/public.php +++ b/src/arenas/tron/public.php @@ -19,9 +19,9 @@ foreach($bots as $bot){ ?>

-
+
+