wavesinaroom / my_odin_project_battleship

0 stars 0 forks source link

HTML implementation #11

Open wavesinaroom opened 1 year ago

wavesinaroom commented 1 year ago

We’ll leave the HTML implementation up to you for now, but you should display both the player’s boards and render them using information from the Gameboard class. You need methods to render the gameboards and to take user input for attacking. For attacks, let the user click on a coordinate in the enemy Gameboard.

wavesinaroom commented 1 year ago

App pallette schemeApp pallette scheme

https://colorhunt.co/palette/0a26471442722052952c74b3

wavesinaroom commented 1 year ago

Finally got a working enviroment with WSL, I'm resuming the project now, current changes seem promising

wavesinaroom commented 1 year ago

Definitely I feel panelBoard should be splitted into two categories. One, panel where player places ships and the other where he shoots. Sound logical but the hard part is to find out if panels should inherit from a object or be themselves independently

wavesinaroom commented 1 year ago

Include this line in specific render methods: this.cells.querySelectorAll('tr')[coordinate.x].querySelectorAll('td')[coordinate.y].innerHTML = character

wavesinaroom commented 1 year ago

Code smells in gameboard.shipsLog and gameboard.tiles. Having coordinates and logs separately is causing great trouble for rendering panels. I'm afraid I've got to spend potentially huge time on making over gameboard and tests. It's gonna be along task but I'll see the pay off in the long run I'm sure