Skip to content

Punith1117/battleship

Repository files navigation

Battleship game

  • 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:

About

Project14 in The Odin Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published