Skip to content

Baguirre03/battleship

Repository files navigation

Project: Battleship

Result

Battleship screenshot

About the project

Link to project assignment

Project Battleship! This one was.. alright. It was great to learn about testing, but I think I was just about to get done with it. Lots of fun, but the code is not the best written, but thats okay because the point of this was to do TDD.

The goal was to make sure that everything outside of the DOM was working correctly with tests before moving on. Which I was able to do correctly.

Notes

  • The Robot is not the smartest
  • That being said, whenever it gets an attack in the middle of the ship as the first point of contact, it normally does not finish that ship off.
  • Also, it can get a little confused when placing ships next to eachother so I would avoid doing so.
  • No where near mobile or any responsive, as I did not feel the need to with this project.

Objectives

  • Setup repository
  • Setup Jest, Babel, Webpack, Prettier, and ESlint all together
  • Begin making modules starting with Ship factory function
  • Make Gameboard factory function
  • Lastly make Player factory function
  • Put all together in a main game loop and module for DOM interaction
  • Add ability to place ships with hover (extra-credit)
  • Add ability to turn ship with right-click
  • Create a Semi-smart Robot attack
  • Ship Project!

What I learned and What I would do differently

Learned:

  • I learned how to setup a very complicated repository
  • I also learned the importance of TDD and the basics of it.
  • Using TDD to test outliers and make the final DOM part of the project easier.

Differently:

  • Write tests for my "smart robot"
  • Plan a little more, kind of just jumped into this project when I shouldnt have.
  • Make a proper reset game button

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published