commit
d8b7244f77
|
@ -5,7 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="author" content="Gnieark" />
|
<meta name="author" content="Gnieark" />
|
||||||
<title>Test ton bot</title>
|
<title>ConnectFour's Ludus</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{width:100%; font-size:100%; line-height:140%; word-wrap:break-word; text-rendering:optimizelegibility;
|
body{width:100%; font-size:100%; line-height:140%; word-wrap:break-word; text-rendering:optimizelegibility;
|
||||||
margin:0 auto; font-family : "lucida grande", "gill sans", arial, sans-serif; left:auto;}
|
margin:0 auto; font-family : "lucida grande", "gill sans", arial, sans-serif; left:auto;}
|
||||||
|
@ -25,10 +25,10 @@ article{float: right; width:70%;}
|
||||||
aside{float:left; width: 28%; border-right: 1px dashed green;}
|
aside{float:left; width: 28%; border-right: 1px dashed green;}
|
||||||
aside table {width: 90%;}
|
aside table {width: 90%;}
|
||||||
aside table tr td{width: 33%;}
|
aside table tr td{width: 33%;}
|
||||||
aside table tr td input{width: 100%;}
|
aside table tr td input, aside table tr td select {width: 100%;}
|
||||||
.center{text-align: center;}
|
.center{text-align: center;}
|
||||||
aside p img{ width: 100%; max-width:342px;}
|
aside p img{ width: 100%; max-width:342px;}
|
||||||
form textarea, form input, form select {width:40%;}
|
form textarea, form input, form select {width:100%;}
|
||||||
form input[type=checkbox], form input[type=radio] { width:15px; }
|
form input[type=checkbox], form input[type=radio] { width:15px; }
|
||||||
form label {float:left; width:40%; margin-right:0.5em;
|
form label {float:left; width:40%; margin-right:0.5em;
|
||||||
padding-top:0.2em; text-align:right;}
|
padding-top:0.2em; text-align:right;}
|
||||||
|
@ -317,9 +317,12 @@ function startGame(){
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Debug and test your connectFour AI</h1>
|
<h1>ConnectFour's Ludus</h1>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
<p>Here you can test and fix your bot, against himself, against human or against any other bot if you know the URL.
|
||||||
|
<br/>No scoring here, it's a Ludus (gladiators training center).</p>
|
||||||
|
|
||||||
<aside>
|
<aside>
|
||||||
<h2>Configure the test</h2>
|
<h2>Configure the test</h2>
|
||||||
<table>
|
<table>
|
||||||
|
@ -330,10 +333,15 @@ function startGame(){
|
||||||
<option value="human">human</option>
|
<option value="human">human</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
<input id="url1" type="text" name="player1URL" placeholder="url du bot http://localhost" value="https://ias.tinad.fr/StupidIAconnectFour.php"/>
|
<input id="url1" type="text" name="player1URL" placeholder="url du bot http://localhost" value="https://ias.tinad.fr/StupidIAconnectFour.php"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Player 2</td>
|
<td>Player 2</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -342,10 +350,13 @@ function startGame(){
|
||||||
<option value="bot">bot</option>
|
<option value="bot">bot</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
<input id="url2" type="text" name="player2URL" placeholder="url du bot http://localhost" disabled value="https://ias.tinad.fr/StupidIAconnectFour.php"/>
|
<input id="url2" type="text" name="player2URL" placeholder="url du bot http://localhost" disabled value="https://ias.tinad.fr/StupidIAconnectFour.php"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<p><input type="button" onclick="startGame()" value="Fight"/></p>
|
<p><input type="button" onclick="startGame()" value="Fight"/></p>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
@ -25,7 +25,7 @@ article{float: right; width:70%;}
|
||||||
aside{float:left; width: 28%; border-right: 1px dashed green;}
|
aside{float:left; width: 28%; border-right: 1px dashed green;}
|
||||||
aside table {width: 90%;}
|
aside table {width: 90%;}
|
||||||
aside table tr td{width: 33%;}
|
aside table tr td{width: 33%;}
|
||||||
aside table tr td input{width: 100%;}
|
aside table tr td input, aside table tr td select {width: 100%;}
|
||||||
.center{text-align: center;}
|
.center{text-align: center;}
|
||||||
aside p img{ width: 100%; max-width:342px;}
|
aside p img{ width: 100%; max-width:342px;}
|
||||||
form textarea, form input, form select {width:40%;}
|
form textarea, form input, form select {width:40%;}
|
||||||
|
@ -246,7 +246,9 @@ function startGame(){
|
||||||
<option value="human">human</option>
|
<option value="human">human</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
<input id="url1" type="text" name="player1URL" placeholder="url du bot http://localhost" value="https://ias.tinad.fr/stupidIATictactoe.php"/>
|
<input id="url1" type="text" name="player1URL" placeholder="url du bot http://localhost" value="https://ias.tinad.fr/stupidIATictactoe.php"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -258,7 +260,9 @@ function startGame(){
|
||||||
<option value="bot">bot</option>
|
<option value="bot">bot</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
<input id="url2" type="text" name="player2URL" placeholder="url du bot http://localhost" disabled value="https://ias.tinad.fr/stupidIATictactoe.php"/>
|
<input id="url2" type="text" name="player2URL" placeholder="url du bot http://localhost" disabled value="https://ias.tinad.fr/stupidIATictactoe.php"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -55,5 +55,7 @@ $lang = array(
|
||||||
'YOUR_EMAIL_FOR_BOT_VALIDATION' => 'Your email address (will serve to validate your bot)',
|
'YOUR_EMAIL_FOR_BOT_VALIDATION' => 'Your email address (will serve to validate your bot)',
|
||||||
'SAVE_BOT' => 'Save',
|
'SAVE_BOT' => 'Save',
|
||||||
'E_MAIL_EDIT_BOT' => "Hello Dude! \n Please Folow the next URL in order to validate your bot update.",
|
'E_MAIL_EDIT_BOT' => "Hello Dude! \n Please Folow the next URL in order to validate your bot update.",
|
||||||
'YOUR_EMAIL_FOR_BOT_EDIT' => 'E-mail used for add this bot:'
|
'YOUR_EMAIL_FOR_BOT_EDIT' => 'E-mail used for add this bot:',
|
||||||
|
'GO-TO-LUDUS' => 'Visit the ludus',
|
||||||
|
'LUDUS-DETAIL' => '(Place to fix / improve your bot without scoring)'
|
||||||
);
|
);
|
|
@ -55,5 +55,7 @@ $lang = array(
|
||||||
'YOUR_EMAIL_FOR_BOT_VALIDATION' => 'Votre adresse e-mail (servira pour la validation de votre bot)',
|
'YOUR_EMAIL_FOR_BOT_VALIDATION' => 'Votre adresse e-mail (servira pour la validation de votre bot)',
|
||||||
'SAVE_BOT' => 'Enregistrer',
|
'SAVE_BOT' => 'Enregistrer',
|
||||||
'E_MAIL_EDIT_BOT' => "Bonjour Dude! \n Suivez l'URL suivante pour valider les modifications sur votre bot.",
|
'E_MAIL_EDIT_BOT' => "Bonjour Dude! \n Suivez l'URL suivante pour valider les modifications sur votre bot.",
|
||||||
'YOUR_EMAIL_FOR_BOT_EDIT' => 'L\'adresse e-mail qui a servi à l\'inscription du bot:'
|
'YOUR_EMAIL_FOR_BOT_EDIT' => 'L\'adresse e-mail qui a servi à l\'inscription du bot:',
|
||||||
|
'GO-TO-LUDUS' => 'Se rendre au ludus',
|
||||||
|
'LUDUS-DETAIL' => '(Page pour débogguer votre bot sans comptage des scores)'
|
||||||
);
|
);
|
|
@ -71,15 +71,11 @@ switch ($_POST['act']){
|
||||||
'player-index' => $player
|
'player-index' => $player
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* 'messageSend' => $data_string,
|
|
||||||
* 'httpStatus' => $curl_getinfo($ch)['http_code'],
|
|
||||||
* 'response' => $output,
|
|
||||||
* 'responseArr' => $arr
|
|
||||||
*/
|
|
||||||
get_IA_Response($_SESSION['bot1']['url'],$params[0]); //don't care about result
|
get_IA_Response($_SESSION['bot1']['url'],$params[0]); //don't care about result
|
||||||
get_IA_Response($_SESSION['bot2']['url'],$params[1]); //don't care about result
|
get_IA_Response($_SESSION['bot2']['url'],$params[1]); //don't care about result
|
||||||
|
|
||||||
|
//don't break, continue
|
||||||
|
|
||||||
case "fight":
|
case "fight":
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@ $arenas=array(
|
||||||
'title' => "Tic Tac Toe",
|
'title' => "Tic Tac Toe",
|
||||||
'metaDescription' => 'Affrontements de bots au TicTacToe, morpion',
|
'metaDescription' => 'Affrontements de bots au TicTacToe, morpion',
|
||||||
'jsFile'=> "js.js",
|
'jsFile'=> "js.js",
|
||||||
'cssFile'=> "style.css"
|
'cssFile'=> "style.css",
|
||||||
|
'ludusUrl' => "/testBotScripts/tictactoe.html"
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'id' => "Battleship",
|
'id' => "Battleship",
|
||||||
|
@ -33,7 +34,8 @@ $arenas=array(
|
||||||
'title' => "Puissance 4",
|
'title' => "Puissance 4",
|
||||||
'metaDescription' => 'Affrontements de bots puissance 4',
|
'metaDescription' => 'Affrontements de bots puissance 4',
|
||||||
'jsFile'=> "js.js",
|
'jsFile'=> "js.js",
|
||||||
'cssFile'=> "style.css"
|
'cssFile'=> "style.css",
|
||||||
|
'ludusUrl' => "/testBotScripts/connectfour.html"
|
||||||
)
|
)
|
||||||
|
|
||||||
);
|
);
|
|
@ -304,10 +304,18 @@ function get_unique_id(){
|
||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
function get_default_aside_content($currentArena){
|
function get_default_aside_content($currentArena){
|
||||||
global $lang;
|
global $lang, $currentArenaArr;
|
||||||
$asideSectionContent = '<h2>infos:</h2><p>'.$lang['DEV-YOUR-OWN-BOT'].'<br/> <a href="/'.$currentArena.'/doc">'.$lang['DOC_SPECS_LINKS'].'</a></p>
|
|
||||||
<h2>Scores</h2>';
|
|
||||||
|
|
||||||
|
//bla bla
|
||||||
|
$asideSectionContent = '<h2>infos:</h2><p>'.$lang['DEV-YOUR-OWN-BOT'].'<br/> <a href="/'.$currentArena.'/doc">'.$lang['DOC_SPECS_LINKS'].'</a></p>';
|
||||||
|
|
||||||
|
//lien pour le ludus
|
||||||
|
if(isset($currentArenaArr['ludusUrl'])){
|
||||||
|
$asideSectionContent.= '<p><a href="'.$currentArenaArr['ludusUrl'].'">'.$lang['GO-TO-LUDUS'].'</a> '.$lang['LUDUS-DETAIL'].'</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//scores
|
||||||
|
$asideSectionContent.='<h2>Scores</h2>';
|
||||||
$podium=ELO_get_podium($currentArena);
|
$podium=ELO_get_podium($currentArena);
|
||||||
$count=0;
|
$count=0;
|
||||||
$asideSectionContent.= '<ul class="podium">';
|
$asideSectionContent.= '<ul class="podium">';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user