Re: How to Determine a Column Conflict in Python
Just find the coordinates of the point and the queen. Find the difference in coordinates (say, dy for p2.y-p1.y) and the same for dx.
Now you're subtracting one set from another, so you're essentially finding the location of the second queen compared to the first. If its a diagonal, the x and y distances have to be the same. Therefore, check the absolute values on dy and dx are equal.
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector