Forum Moderators: open

Message Too Old, No Replies

How to do chess with XML

please help!

         

riginosz

12:42 am on Feb 18, 2005 (gmt 0)

10+ Year Member



Hi!
I am trying to implement the chess game using jav and XML for my project at the university.
Can anyone guide-help me because I really find it very difficult.
Any sample scripts,books relevant to my project will really help me.

Thanks,
Vasilis

monsterhead

8:39 am on Feb 23, 2005 (gmt 0)

10+ Year Member



you'd have to be more specific

riginosz

12:26 pm on Feb 23, 2005 (gmt 0)

10+ Year Member



The project will involve besides creative thinking a substantial amount of programming with Java and XML.

The aim of this project will be to design and implement an XML driven chess editor that allows a chess player/journalist to annotate and analyse a game of chess in such a way so that online readers of his analysis can replay the moves of the game and moves of the analysis with help of a small chessboard simulator that comes with the online analysis.

Thanks,
Riginos

cmatcme

6:57 pm on Feb 26, 2005 (gmt 0)

10+ Year Member



Isn't there any other langauges you can use?

PHP, ASP ...

brucec

2:02 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



I think XML is perfect for a chess game, but you will need to access the DOM (Document Object Model) to keep track of your moves between white and black and change the XML nodes.

Maybe your XML can go something like this:

<chess_moves>

<move color="black">
<from>P2</from>
<to>P3</to>
</move>

<move color="white">
<from>K5</from>
<to>Q5</to>
</move>

</chess_moves>

You will need to use the java to keep track of the moves between the two pieces and if you can use a CreateNode function in the DOM, all the better.

I hope this helps,
Bruce

brucec

2:04 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



I guess your XML can also have elements for the pieces as well. For example:

<piece>bishop</piece>
<piece>king</piece>

etc