Re: [Tutor] checking diagonals on a chessboard

2006-04-13 Thread Steve Nelson
On 4/13/06, Matthew Singletary <[EMAIL PROTECTED]> wrote: > I'm NOT looking for any answers, just some tips to an _elegant_ method to > solve this. My tutor/mentor and I wrote a chess program a while back - diaganols were the hardest bit to get working! Essentially diagonals are treated as thoug

Re: [Tutor] checking diagonals on a chessboard

2006-04-13 Thread Matthew Singletary
Thanks for the input from everyone,I had been working with a flat array and checking the horizontals and verticals with slices and mod math but I think the tuple approach would be pretty easy to change to use. I can't ever recall being interested in a test from a test suite but my interest is pique

Re: [Tutor] checking diagonals on a chessboard

2006-04-13 Thread Danny Yoo
> I'm building a genetic algorithm to solve the queen placement problem, > the complicated stuff I can do on my own, but I'm not getting one part. > suppose the queen is on a square, I can check that it is in the same row > or same col but the diagonals, are less straight-forward. I know I could

Re: [Tutor] checking diagonals on a chessboard

2006-04-13 Thread Tim Peters
[Matthew Singletary] >> I'm building a genetic algorithm to solve the queen placement problem, >> the complicated stuff I can do on my own, but I'm not getting one >> part. >> suppose the queen is on a square, I can check that it is in the same >> row or same col but the diagonals, are less straigh

Re: [Tutor] checking diagonals on a chessboard

2006-04-13 Thread Python
On Thu, 2006-04-13 at 15:16 -0400, Matthew Singletary wrote: > I'm building a genetic algorithm to solve the queen placement problem, > the complicated stuff I can do on my own, but I'm not getting one > part. > suppose the queen is on a square, I can check that it is in the same > row or same co

Re: [Tutor] checking diagonals on a chessboard

2006-04-13 Thread Andre Roberge
On 4/13/06, Matthew Singletary <[EMAIL PROTECTED]> wrote: > > first, A disclaimer: > This isn't directly homework but is related to an assignment of mine > > I'm building a genetic algorithm to solve the queen placement problem, the > complicated stuff I can do on my own, but I'm not getting one pa

[Tutor] checking diagonals on a chessboard

2006-04-13 Thread Matthew Singletary
first, A disclaimer: This isn't directly homework but is related to an assignment of mine   I'm building a genetic algorithm to solve the queen placement problem, the complicated stuff I can do on my own, but I'm not getting one part.  suppose the queen is on a square, I can check that it is in th