I'm working on some kind of maze game, I'm not an expert at C++ programming, but with my basic knowledge, I'm able to get something done.
What happens in this code is that you can move around inside a square.
The square has boundaries and you cannot move onto it or move past it.
Moving left and moving up works perfectly fine, but moving down and right, it isn't working as it should.
It just moves all the way to the end of their respective sides, so if I'm in the middle and I move right, it goes all the way to the end instead of moving just once, same goes for down.
Ahh, I can see you mean now. I might need more time to think through this.
Anyhow, I'm just quickly do one of your suggestions.
I did the second part of your suggestion by placing the break; statement.
It seems the right direction works now, but the down direction does not.