Check it out here
The rules of Battleship are simple:
- Each player has their ships randomly placed on their respective boards at the begining of each game.
- Players take turns firing shots by selecting coordinates on the opponent's grid.
- The game ends when all ships of one player are sunk.
- The player who sinks all of the opponent's ships first wins the game.
- The algorithm used for the AI player's attack draws from principles of Breath First Search (BFS) and Depth-First Search (DFS) algorithms.
- The UI design
- Naming of some files and folders could be made more descriptive to reflect the content within them (might refactor it in the future); the same can be said about some of the functions;
- Some of the functions could have been split into more concise implementations.