Selected piece

1 view
Skip to first unread message

Usman Masood

unread,
Apr 4, 2010, 10:40:32 AM4/4/10
to 68...@googlegroups.com
If we drag and drop a piece on some square that is already filled, should it result it select the the initial location of the piece we were moving or the square in which we released the mouse? It seems like to do the former, one needs to implement some of the code in the Stroke and Pixel model which I think the pset says we're not supposed to do. Any ideas?

Usman

Ted Tomlinson

unread,
Apr 4, 2010, 10:46:47 AM4/4/10
to 68...@googlegroups.com
I think the selection should stay where the original piece started from since it should have moved back there after the failed move. Also you can definitely put code into the specific implementations of Checkerboard (Stroke and Pixel) for the last part, it just says most of your code should be in the parent Checkerboard class. It seems like you have to put code in the stroke model to redraw the checker after drawing the selected square as yellow.
Reply all
Reply to author
Forward
0 new messages