Pirates Ahoy

JavaScript / Jest

TLDR: I made a battleship game, you should play it HERE

Here's my quick attempt at the popular battleship game.

battleships

This project is a side effect of me trying to learn how to do test driven development so it utilises Jest quite heavily.

To ensure the game is not too easy I've added a Hunt algorithm. This improved algorithm includes an instruction to explore nearby spaces whenever a prior shot hit. Every human who has ever played Battleships will do this intuitively. It's great improvement on the computer win-ratio as it completes 50% of games within ~65 turns, as long as it is not defeated beforehand. Your little toddler nephew will certainly lose, and you might experience some difficulty as well from time to time.

Try to make it before the 65th turn :D => Pirates Ahoy

If you'd like to have a look at the source code it's available here

Copyright 2023 @Everybodytothelimit