gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] board code revisited


From: Gunnar Farnebäck
Subject: [gnugo-devel] board code revisited
Date: Thu, 13 May 2004 04:16:06 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Okay, I'm perfectly aware that I'm in the best position to answer this
question but since I don't know the answer I hope that somebody else
can come up with a good explanation anyway. :-)

In the definition of the vertex_stack_entry struct (board.c, line 78),

struct vertex_stack_entry {
  Intersection *address;
  int value;
};

why is the field value an int and not of type Intersection?


And while I'm going around criticizing my own code, here's an exercise
for your amusement. Assume that change_stack[] turns out to be too
small in some situation. What exactly will happen (there are a few
typical cases) when the buffer is overrun? How big is the probability
that the assertion in undo_trymove() will trigger before a
segmentation violation happens or some other assertion is hit?

/Gunnar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]