Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Problem with Object Oriented Design (programming issue)

Author: Pat King

Date: 18:19:34 09/19/03

Go up one level in this thread


On September 18, 2003 at 05:41:35, Daniel Clausen wrote:

>On September 17, 2003 at 19:14:24, Pat King wrote:
>
>[snip]
>
>>class Piece: public Apiece, Position; // implements default apiece methods
>>//(MakeMove(move), UndoMove(move)), has access to position for this purpose.
>
>I don't understand this one - piece both inherits from the abstract piece and
>position?
>
>
>>Hope this is interesting/helpful.
>
>It definitely is, thanks!
>
>Sargon
Yes. Position has static structures that Piece and its descendants need to be
able to manipulate. I chose to do this through inheritance.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.