When a chess piece is dragged and dropped the move needs to be checked for validity.
How do I carry around the data of which of the 64 squares the original square of the piece came from and get at the data of which of the 64开发者_StackOverflow squares the drop square is, all of this in the context of gwt-dnd?
I am very very new to gwt and gwt-dnd. Some pseudo code would be very much appreciated.
I do similar thing but with gwtquery drag-and-drop plugin. I create a simple checker game : http://gwtquery-plugins.googlecode.com/svn/trunk/droppable/demo/DraughtsSample/DraughtsSample.html
The code can be found there : http://gwtquery-plugins.googlecode.com/svn/trunk/droppable/demo/DraughtsSample/DraughtsSample.html
I guess you can inspire you with what I did and adapt it to gwt-dnd...
If you want more info about gwtquery drag-and-drop plugin, just read this article : http://code.google.com/p/gwtquery-plugins/wiki/DragAndDropPluginForGWTDeveloppers
精彩评论