Re: [Housebot-developers] SF.net SVN: housebot: [466]trunk/housebot/src
Status: Alpha
Brought to you by:
j_house
|
From: Phil G <go...@th...> - 2007-02-16 06:24:41
|
> I realize that statement is probably a bit unfair. =0A =0ANo worries. = We are all friends here - too bad we can't chat at Starbucks over this inst= ead.=0A =0A> GoBoard is really a facade for interacting with both SGF and t= he collective. =0A> I was more thinking of the pattern matcher's usage. I= can't really think of any =0A> reason for the pattern matcher to need it.= =0A =0AThe pattern matcher does a bit more than just match stones to fixed = patterns, it can consider additional types of constraints. For example, a p= attern can have a constraint that, for example, requires that a chain at a = given position have at least X number of liberties, ie., "lib(a) > 2". The = "facade" design pattern provides a way for the "collective" to publish a si= mplified interface to external components. In this trival example, the "fac= ade" interface provides a method to return the number of liberties at a giv= en position. This abstracts the calling component from having to directly i= nteract with status trackers (which is a design implementation of the colle= ctive). In my mind, this is the "decoupling" of interfaces and implementat= ion.=0A =0A> With the current (limited) usage of the facade, it's possible = to =0A> separate out the SGF (and all need for the facade) into a distinct = =0A> component similar to gtpadapter. =0A =0AActually, the SGF relies heav= ily on the GameTree (GameRecord would have been a better name) for saving s= ince the "collective" doesn't really keep a history of moves, and other SGF= attributes. For this GoBoardInterface employs a type of "Decorator" design= pattern (upon the facade) to keep track of things the collective doesn't -= like move history. For loading, the SGF code retrieves the main game varia= tion into the GameTree instance. The GameTree then uses the "facade" interf= ace to issues moves to the collective. Nothing really serious or complex go= ing on here. =0A=0A> Unless a more encompassing usage of the facade is don= e, I'd =0A> favor a gtpadapter style since it's highly decoupled. =0A> I'm= a big fan of decoupling ;)=0A =0AI am too; however, we may differ on the t= ype of decoupling - and design pattern. It would help me understand more, i= f you have a particular design pattern in mind. I have most of the Addison-= Wesley book publications, "Design Pattern: Elements of Resulable Object-Ori= ented Software", "Large Scale C++ Software Design" and "Effective C++" seri= es to look it up in, or wikipedia. =0A=0A- Phil=0A=0A----------------------= ---------------------------------------------------=0AUsing Tomcat but need= to do more? Need to support web services, security?=0AGet stuff done quick= ly with pre-integrated technology to make your job easier.=0ADownload IBM W= ebSphere Application Server v.1.0.1 based on Apache Geronimo=0Ahttp://sel.a= s-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642=0A____= ___________________________________________=0AHousebot-developers mailing l= ist...@li...=0Ahttps://lists.sourceforge= .net/lists/listinfo/housebot-developers |