From b6350da646316ad26ca4fc513d5d269932237f2f Mon Sep 17 00:00:00 2001 From: Gnieark Date: Fri, 27 May 2016 22:56:26 +0200 Subject: [PATCH] fix --- html/testBot.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/testBot.html b/html/testBot.html index 3f461ed..fc04151 100644 --- a/html/testBot.html +++ b/html/testBot.html @@ -127,7 +127,8 @@ function play(player){ if(xhr.status == 200) { var response=xhr.responseText; - if (response.match('/^[0-6]$/')){ + var t = new RegExp('/^[0-6]$/'); + if (t.test(response)){ playingAT(response); }else{ alert ('la reponse du bot doit etre un digit compris entre 0 et 7, correspondant à la colonne. Voici sa réponse ' + response);