Skip to content

Battleship game created for The Odin Project JS Curriculum

Notifications You must be signed in to change notification settings

fortypercenttitanium/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship

Link

https://benders-battleship.netlify.app/

Purpose

This Battleship project was part of my self-guided education through The Odin Project JS Curriculum. The intention of this was to practice the basics of testing using Jest, while also refining my skills with React.

Some of the challenges, aside from learning Jest, included using object-oriented paradigms alongside of React state-management good practices. If I started this project again, I would devise a cleaner way of handling the state of the game either by making the object data completely immutable or making the game logic decoupled from the local react state by using context and reducer actions.

Another challenge was handling and rendering the SVG components correctly, in particular, flipping them for y-axis ship alignments.

Devising a clever algorithm for the AI to play like a human was the final challenge, and one that proved to take more time than I anticipated. However, it was probably the most fun and rewarding aspect of this project.

Features:

  • Interactive browser-based game akin to the Hasbro™ board game.
  • Smart AI that plays similarly to a human (does not "cheat")
  • Satisfying naval sound effects and war music to pump you up

About

Battleship game created for The Odin Project JS Curriculum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published