Sorry for the late reply guys, long day, just now finally able to sit down at my PC >_<
Sounds suspiciously what might happen if you write out of bounds somewhere (and probably somewhere else).
Are the convertedCoords always in bounds of _board?
Checking the values in the debugger it never goes out of bounds.
Depending on your environment another possibility is that you have a situation where the source code doesn't actually match the object code you're debugging. In that case a full rebuild may eliminate some weirdness.
That worked! I apologize I'm still new so can you clarify this statement for me cause I'm sorta lost. Is it just that what's being run isn't what I'm seeing on my screen? What exactly is it running instead? Just asking for my knowledge, thank you.
Depending on your environment another possibility is that you have a situation where the source code doesn't actually match the object code you're debugging. In that case a full rebuild may eliminate some weirdness.
This is usually the first thing you should do when you encounter something that doesn't make sense. The other thing you can do is look at the assembly code that is being executed and see if it doesn't jump to the wrong location.
As noted above this solved it, thank you!
Debugging per line "step into" should take you through the code per line. So you can see if the values are as expected and why true or false is returned. You could start the debugging by a break point in the main code, where you call the collision function.
Yeah even debugging, I would see it enter the if statement within the checkCollision method, go right to the return true, and like completely disregard it, just go outside of the if statement block, and go down the "}" until it got to the return false; then exit the method.
Depending on your environment another possibility is that you have a situation where the source code doesn't actually match the object code you're debugging. In that case a full rebuild may eliminate some weirdness.
This happens a lot; especially under Windows with Visual Studio. Do a clean and rebuild.
This solved it thank you sir ;) and indeed I'm using Visual Studio.
It's doing exactly what you told it to do.
if ((*_bagOfTetrominos.front()).checkCollision())
This code is obviously printing "Did Nothing" when checkCollision returns true.
**Update**: I may have misread the problem. Maybe still too early for my brain, but am I understanding what the problem is properly?
It was printing "Did Something" which confused the hell outa me lol. It's all good, mornings do that to me too.
How about you print a seperator in between consecutive executions of the if statement that should help too.
The above solved it, but I definitely do appreciate your input.Thank you.