Hey everyone, I'm writing a simple chess clone and I'm not sure how to implement the diagonal moving. I already made the Pawn, Knight, and Rook, but I'm having trouble on figuring out the diagonal moving through a 2d array. Anyone have an algorithm or guide on implementing diagonal moves? Thanks! (I'm working on the Bishop now)
EDIT: A shower later and I just realized the same way I did the attacking for the Pawn is how I would do the diagonals for the Bishops. Sometimes typing the question out and a nice shower helps get the brain working haha! Thanks anyway!
Edited by SonicD007, 25 June 2012 - 08:25 PM.