A brand new game
for Windows, Linux, Mac, HTML5, 3DS Homebrew and more
every week,
unless exhausted!
About Games Music Pixelart Poetry Home Patreon Scores JNKPlat Petit Switch
  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 38, Upvotes 3
Daily Blog , 605
Site credits : All of the above : Jayenkai
(c) Jayenkai 2017 and onwards. RSS feed
Blog - Hmmm... - AGameAWeek