Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Delphi (http://www.programmingforums.org/forum41.html)
-   -   Chess board interface (http://www.programmingforums.org/showthread.php?t=13113)

Xyhm May 4th, 2007 9:24 PM

Chess board interface
 
I'm coding a chess computer and I need some pointers on how to create a decent board interface. What I have right now is 64 labels with numbers to represent pieces (1 for a white pawn, 2 for a white knight, and so on). I want real looking pieces with drag'n'drop to move them. (This is purely a question about graphics, the internal stuff and how the board communicates with the internal is no problem.)

(edit: actually, just reading about dragging and dropping may give me what I need. Maybe not, just thought I'd mention that.)

physicist May 11th, 2007 12:08 AM

well, if delphi is anything like VB.net (which i think it is, you talk about labels and stuff) just use pictureboxes....

Xyhm May 13th, 2007 7:35 AM

Quote:

Originally Posted by physicist (Post 127736)
well, if delphi is anything like VB.net (which i think it is, you talk about labels and stuff) just use pictureboxes....

That's the solution I've chosen for the moment. I have one picture for each possible combination (every white and black piece against a background of either white or black), and simply display pictures in accordance with the internal board. That's good enough, though it isn't drag'n'drop (I create the moves by clicking on the move-from and move-to square), and the pieces aren't separate from the background. But it'll do for now.


All times are GMT -5. The time now is 11:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC