Alchachess: Dev Log 2


Finally fixed an annoying bug that made it so all the data was lost on tiles down and left of a piece that was moved. 

The but was in the distance calculation. To get the distance of the path selected for a piece to move I subtract the start position from the end position then take the highest value between the x and y of the resulting vector. This was not effective when the resulting vector had a negative x or y value. The solution was to set the x and y to their absolute value. 

Now onto the fun stuff like gaining levels and an opponent AI!

Leave a comment

Log in with itch.io to leave a comment.