I have made a function called game_over which returns a boolean based on whether a grid representing a 2048 game is in a game over situation. If it is it returns false if it is not it would return true.
The function works perfectly except in one situation where there is one zero left it would return true and I can not figure out why this is. It should if there is a zero return false as it goes into the first for loop which checks if there is a zero. What is going on here?
Thank you for your reply. I am using a function called twod_to_oned which allows me to used 2D indices on a vector as you can see above. Using this I am able to locate numbers in the vector using their row and coloumn index.