I feel like I’ve been googling this for ages.
Question: How do I visualize game information from an array?
Example 1: Battleship. If I had a grid representing the play area where players placed their ships (this saved in array) and you click on a part of the grid, how would I check the clicked area against the array? How would I know if I hit the battleship or not?
Example 2: Tetris. To see if a line is full and is to be removed someone said it was best to represent the lines with an array, if the array line is full remove the bricks and the information from the array. How would I do this?
What if I had a grid and when I clicked a specific place a specific array entry got changed?
I might be thinking completely wrong and might be talking jibberish. But I have been searching for an answer to this question for what feels like forever and I I die a little inside whenever I fail horribly at achieving this.