Basically i need to implement a mechanic that allows me to shoot at randomly placed atoms in an array from walls of the array. My shot can be reflected detoured or it can hit an atom, but I have no Idea how to write a function that keeps track of the shot in relation with atoms. Below I post a wiki page where you can see how it works.
https://en.wikipedia.org/wiki/Black_Box_(game)
Black Box is an abstract board game for one or two players, which simulates shooting rays into a black box to deduce the locations of "atoms" hidden inside. It was created by Eric Solomon. The board game was published by Waddingtons from the mid-1970s and by Parker Brothers in the late 1970s. The game can also be played with pen and paper, and t...