diff --git a/html/testBotScripts/tron.html b/html/testBotScripts/tron.html index 460acb5..7c2730e 100755 --- a/html/testBotScripts/tron.html +++ b/html/testBotScripts/tron.html @@ -22,9 +22,12 @@ footer{height: 70px; display: block; color: #343638; font-size: 11pt; line-heigh footer a {margin:0px 15px 0px 15px; color: #666;text-decoration: none; font-weight: normal;} #languages{float: right; text-align: right;} section{margin: 0 auto; width: 90%;} -article{float: right; width:70%;} -aside{float:left;width:29%;} -.playerBox{ float:left;} + +aside, .large {width:100%;} +article{} + + +.playerBox{ float:left; max-width: 300px;} .playerBox em {width: 100%;} .playerBox em label {text-overflow: hidden; display: inline-block; width: 30%; margin-right: 20px; vertical-align: top; text-align: right;} @@ -189,14 +192,23 @@ function createPlayerForm(index){ 'input', { 'type':'button', - 'value':'Add this player', + 'value':'Add another player', 'onclick':'createPlayerForm(\'' + (parseFloat(index) + 1) + '\');' }, - '' + '', + 'fightButton' + index ) ); container.appendChild(divForm); + //delete the previous submit button + if(index > 0){ + //alert('fightButton' +(parseFloat(index) - 1 )); + var theButton = document.getElementById('fightButton' +(parseFloat(index) - 1 )); + theButton.parentNode.removeChild(theButton); + } + + //to hide by default: //changeTypePlayer(index,'human'); @@ -206,12 +218,20 @@ function createPlayerForm(index){ window.scrollTo(0,document.body.scrollHeight); //show (or not) button to launch the game - if( index > 1){ - - + if( index > 0){ + document.getElementById('buttonFight').className="large"; + }else{ + document.getElementById('buttonFight').className="hidden"; } } +function initGame(playersSum){ + //find all vars + + //how many bots + +} + --> @@ -224,20 +244,17 @@ function createPlayerForm(index){
No scoring here, it's a Ludus (gladiators training center).

-
+

+ +