Lists Home |
Date Index |
> You need to be a lot more specific about what information you want to
> represent. The state of a game (where the pieces are)? The history of a
> game (how the pieces got there)? An analysis of the game?
I was being vague, because I was backhandedly asking permission to present
my puny problem first...
Very possibly I've got my apples and oranges (and my metaphores) mixed up
here, but I don't really want to model the rules of the board, just these
sort of obvious impossibilities:
- not allowing two allied bishops on the same colour (oh, HOW?)
- Only exactly one King per side (done)
- Maximum number of piece types, alowing for promotion (yep)
- pawns dont get to go to home (done)
Questions like "how, and can, a Knight move here" are not an issue.
On the other hand these are:
- making sure every other square on the board is going to be black
(this i'm fighting with, and giving up)
- pieces don't occupy the same square (uniqueness with coordinates?)
The board representation thingie is annoying me. If I make sure that every
square is represented in the document and within a square there is at
maximum one piece, everything else becomes a hazzle. How do I check for "one
king" or "less than nine pawns", this is what i can't get my head around.
and of course checking for the sameness of bishops
So there is either the possibility of forcing the whole board to be present
in the document or the more sensible method of just presenting the pieces
with their coordinates. Unfortunately I'm required to do it the first way
unless i can somehow mathematicise within the schema to force the b/w grid
unto the creator of the xml document?
Jon Thompson Coon