[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Patch: life.c 1-dimensional
From: |
Inge Wallin |
Subject: |
Re: [gnugo-devel] Patch: life.c 1-dimensional |
Date: |
Sun, 21 Oct 2001 19:18:08 +0200 (MET DST) |
> I noticed the following piece:
>
> + if (( i > 0 && proper_eye[ii-NS])
> + || (i < board_size-1 && proper_eye[ii+NS])
> + || (j > 0 && proper_eye[ii-1])
> + || (j < board_size-1 && proper_eye[ii+1])) {
>
> Why not use the NORTH, SOUTH etc macros?
I find them more difficult to read than using +NS, -1, etc. The 1D
code is so new that there hasn't yet come up any definite way of doing
things and we are currently experimenting to find out the best ways.
I haven't made up my mind yet how to best do offsets, but so far I
think explicit offsets are the best. Especially for more distant
points, I think ii+2 is much more readable than EAST(EAST(ii)).
-Inge