Hello, Im making a game that involves a 4*4 grid the user enters letters and the game has to highlight the letters and they have to be next to one another.
I have a sub that checks if the current letter is next to (or neighbouring) the last letter. Basically what needs to happen is :
for each letter iterate through the grid and try every possibility if it is next to the previous letter, and the current letter matches the target letter
then it tries every possibility for each leter so it needs to iterate 16 ^ (number of letters)
if someone could lead me in the right direction, or give me a better algorithm id really appreciate it. I'm using vb .net but psuedocode works too.
Thanks