Author: Russell Reagan
Date: 15:55:54 06/28/02
Go up one level in this thread
On June 28, 2002 at 05:02:19, Daniel Clausen wrote: >On June 28, 2002 at 04:44:19, Russell Reagan wrote: > >>My move struct has a toMove() method (C++) and it currently has no knowledge >>of the position it's being made in. So how am I supposed to be able to do this >>extra checking without knowing what the rest of the position looks like? How >>about adding a static pointer to my position struct and have the move struct >>access the position via that? > >I didn't like the dependency move->board position. I introduced a class >'MovePrettyPrinter' which gets a position and a move and can pretty print it. > >Sargon It's not really "dependent" is it? In other words, the only thing that it needs the position for is to convert a move to algebraic notation. I think any kind of move structure is going to run into the same problem and have to have some kind of "pretty print" function that takes a position. I was just thinking that there might be a nice way to be able to do move->toString(ALGEBRAIC); without having to do move->toString(ALEBRAIC, &position); but I suppose it wouldn't be THAT big of a deal since it's only output and it's not super critical anyway. Russell
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.