From 0b90324a310e3534330a3d987bea225113998b3b Mon Sep 17 00:00:00 2001 From: Gnieark Date: Thu, 17 Dec 2015 16:14:29 +0100 Subject: [PATCH] fix js$ --- src/arenas/Battleship/js.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arenas/Battleship/js.js b/src/arenas/Battleship/js.js index 7447d11..e7eb204 100644 --- a/src/arenas/Battleship/js.js +++ b/src/arenas/Battleship/js.js @@ -22,9 +22,9 @@ function createElem(type,attributes) function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShip4,nbShip5,nbShip6,xd_check){ - var shipsArea=nbShip1 + 2 * nbShip2 + 3 * nbShip3 + 4 * nbShip4 + 5 * nbShip5 + 6 * nbShip6; + var shipsArea= nbShip1 + 2 * nbShip2 + 3 * nbShip3 + 4 * nbShip4 + 5 * nbShip5 + 6 * nbShip6; if(shipsArea > gridWidth * gridHeight / 2 ){ - alert("Map is too small. Sum of ships areas must be under 50% of the map."); + alert("Map is too small. Sum of ships areas must be under 50% of the map." + shipsArea); return; } var ships= [0,nbShip1,nbShip2,nbShip3,nbShip4,nbShip5,nbShip6];