BattleShip
This is the game 'BattleShip' but made in JavaScript alongside the help of HTML and CSS, this is the first Project where I've used the JEST Tests to test the game code. It's from the course "The Odin Project"
I've made so that a random name gets choosen first but the Player can always change it. There's a 2-Players Mode where you can play player-against-player or player-against-robot.
The ships in the Robot Gameboard get placed randomly and the robot plays also randomly, there's a sort of system in place which doesn't let you click your own board in this Mode. While in the Player-against-Player Mode the Players have to place their Ships (It's a simple prompt usage) first before playing and there's a turn system that disables one board at a time.
A difficult part was make the DOM work alongside the original JS Classes (Ship, Gameboard, Player) but it wasn't so difficult at the end and it was actually fun to do it
Mobile view, Front-Page of this Project but taken Fullscreen
Mobile view, an example of a Player winning but taken Fullscreen