New games every week!
Hmmm... Blog
26th January 2019
I spent about 2 hours, yesterday, trying to solve one incredibly bizarre issue.



-=-=-

(Note : Yes, I know that the movement is incorrect! I'm currently trying to get Queen movement to work correctly!!)

On the left, the knight on the right is being correctly blocked by both the king and the queen.
On the right, however, the queen is NOT being correctly blocked by the knight to her left.

I know the "object to left" code is working, because the knight is being blocked by the queen to its left.
And I know the "Object directly adjacent" (1 step away) bit is working, because both of the pieces are being blocked by the King.
So, why is the queen still able to move to her left?

This one little issue has been enough to completely stunt my coding for the entire day.
Hopefully today I can figure that out. It's bound to be some bizarre float-int issue or something, that I just haven't spotted.

But it's certainly a bit of a pain!!
Views 115, Upvotes 22  
Daily Blog , 605
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2023 and onwards, RSS feed 4

Blog - Hmmm... - AGameAWeek