My first post here and only because of my inability to understand what I am doing wrong with my code. Just a little background, this is an assignment I have for my programming class and we are to build a working replica of the old game "Minesweeper" in c++. Well my design was to build two separate boards, a user board (That is displayed), and a game board (which hold the data ie. bomb locations and number of bombs surrounding certain area.) Right now I am building the Game Board that will be fed into the userboard but something is going terribly wrong with my code and it cant seem to place the appropriate numbers in the squares to define how many bombs are surrounding said squares. Take a look for yourself.
This doesn't make much sense to me. How does that highlight the surrounding 8 areas and change their vaules to +1? Now i just have changing the bombs from -1s to 0s. >.< Sorry, I just don't understand.
EDIT: Okay now i see how it works, it looks at each of the eight frames surrounding the currently selected box and tests if they are a bomb. But I dont understand how to add one to the number if it isnt a bomb :/