siit-webdev-47 / treasure-hunt-game

1 stars 0 forks source link

Treasure tile should be set upon creating the map #6

Closed Adrian-Moldovan closed 1 month ago

Adrian-Moldovan commented 2 months ago
RaresGherasim commented 1 month ago

Created a new folder Functions , a new file inside, called generateMapTiles.js and moved the functions that generate the tiles there Added the hasTreasure property to tiles, with all the values set to False Created a function to generate the treasure position, with random numbers depending on rows and columns, that set the hasTreasure property to true for that specific position A new div was created , that shows the treasure icon in tile if the property hasTreasure is true