view on Github
Warning:
PLEASE DON'T TRY TO BREAK THIS GAME.
It will continuously loop and try to place all ships randomly on each player's gameboard, if you input something not meet the logic (e.g. you try to place a ship 5 unit length in a 4*4 size gameboard, or you try to place 5 ships 1 unit length in a 2*2 size gameboard ...etc), then you will have infinite loop and your browser will be frozen.
Good luck. Have fun. Don't freeze!
Setup:
Note:
Green: ship is healthy
Yellow: ship is oneshot
Red: ship is dead
If you're not happy with the ship layout, press "restart" button to reset.
Ships left: 6