verif arena

This commit is contained in:
Gnieark 2015-12-19 13:57:39 +01:00
parent 88d2106aa0
commit eed0b2ff06

View File

@ -207,6 +207,10 @@ switch($_POST['act']){
echo json_encode($shipsCoords); echo json_encode($shipsCoords);
break; break;
case "fight": case "fight":
//for debog arena
file_put_contents(__DIR__."log.txt",print_r($_POST));
// if((is_int(settype($_POST['width'],"integer"))) && (is_int(settype($_POST['height'],"integer")))){ // if((is_int(settype($_POST['width'],"integer"))) && (is_int(settype($_POST['height'],"integer")))){
echo rand(0,$_POST['width'] -1).",".rand(0,$_POST['height'] -1); echo rand(0,$_POST['width'] -1).",".rand(0,$_POST['height'] -1);
// }else{ // }else{