Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Use of objects and associated performance hit?

Author: Tom Kerrigan

Date: 16:56:28 12/31/99

Go up one level in this thread


On December 31, 1999 at 08:52:00, Daniel Clausen wrote:

>A lot of people tend to 'solve' a lot of problems by sub-classing - and in the
>end they end up with a rather silly/strange design. If I understood you
>correctly, you want to accomplish that your engine has a board, which sounds

Exactly. But I also want to access the member variables and functions of the
board as if they were part of the engine. (Otherwise everything looks like a big
mess.) The only way I can think of to accomplish this is to make the engine
class a derivative of the board class.

It seems to me that this "sub-class" feature of C++ does EXACTLY what I need.
Happily, I don't have any hang-ups about how the feature should and should not
be used.

-Tom



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.