On Friday, January 16, 2004, at 08:51 AM, Robin Kramer wrote:
If it works, there will be excellent documentation. I'm good at that. :-)If there is excellent documentation for the interface, my preference,On Friday, January 16, 2004, at 01:36 AM, Patrick Stiegeler wrote:So you only have a single NotificationServer? How do you determinedear peter, i think, i did something like what you call "event-driven programming". i use a singleton which i call a NotificationServer and which handles all the message passing:
which listeners get which events ... or do you just send every event to
all listeners in the entire system?
would be for the listeners to be able to register for events and register
generated events. Otherwise, providing a list of events might be easier
for everyone involved.
One other question, will some modules be able to generate events? WillI'm not sure I understand your question. Yes, objects will be able to generate events (generally in response to another event they received). I suppose the ladder reader could generate a "ladder broken" event, to which both the joseki and tesuji listeners would react.
modules be able to set up their own event servers to incorporate
information from other machines(i.e. if two modules could use information
about ladders, maybe a joseki and a tesuji module will they both be able
to use a module which reads ladders?)
Would it be possible to code an event server,client object that could beI think it's important to have a master event queue on a single machine. Otherwise there are race condition issues.
included in each module?
Is there any way to provide for thinking about a move during the opponentsIt should be possible through multithreading. Keep a collection of analyzer(?) objects around. If its the opponent's turn, let one of the analyzers fire an event which might set up a cascade of other events. Once the event queue settles down, check whether it's our turn yet -- if not, do more analysis.
turn?