-
This is a browser based Battleship game built using HTML, CSS and Javascript. It follows the principles of Test-Driven Development(TDD) and was created as part of The Odin Project curriculum.
-
Try it out now by clicking here
-
Technologies used:
- HTML, CSS, Javascript
- Jest(for unit testing)
-
What I learned:
- Using Jest for writing tests.
- Focused on modular functions.
- Using various Jest matchers to test conveniently.
-
Challenges I faced:
- When placing ships randomly, there existed cases where the last ship couldn't be placed anywhere on the board which lead to infinite while loop. The easiest way to fix this was by reducing the number of ships being placed.
- If the dialog is set to display: flex, it makes the dialog to get permanently displayed irrespective of the default invisible behavior. This was fixed by adding display: flex only when a player had won
-
To know more about the game click here.
-
credits:
- reset.css from joshwcomeau
- font from google fonts
generated from Punith1117/web-dev-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Project14 in The Odin Project
Punith1117/battleship
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Project14 in The Odin Project
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published