Hello! I return to bother you once more with questions!
I have a square on the board, a so-called "settlement", that I want to be able to use to create more units in the game. When asked to add another unit/chess I want it to place it either on the square itself, or next to it, if the square is already occupied. So far I am able to place the chess on the square, but when it is occupied I get the error when a space already has a chess in place - I can't make it go on to place it on the next tile instead.
Here is my code that I've experimented with so far, and which doesn't seem to work:
Basically I want it to check if tile is empty? If so: place chess. If not: check if next tile in row is empty and place chess.