Re: How to: referencing variables using the contents of otehr variables.
fguy64s@gmail.com wrote:
benefits of keeping a simple list of piece locations, I mean there is
No, it's the simple part here that is wrong. Making the list more
object oriented would almost certainly be a benefit, and simpler in the
long run.
had conceived when I started the thread. When it comes down to
creating a list of legal moves, I can easily do the majority of the
work by accessing the staticl list of pieces and squares.
Even this strikes me as poor programing. Game programming for a long
time has emphasized data driven design. That is, not static. For good
design, testing, and flexibility, I think you should consider making
this info non-static.
instance variable is K, k, R, r, etc. A position is also an object,
My experience with chess notations is that there are quite a lot of
them, and you shouldn't hard code your application to use only one.
You're just going to box yourself into a corner needlessly and then
regret it later.
<http://en.wikipedia.org/wiki/Algebraic_chess_notation>
For the record, I play go now.
http://www.gokgs.com/