Currently, the Pieces are dynamically loaded and draw at run-time.
When in the Review mode, pieces are re-created (using new Image()) and then
load() and then
re-add to the parent again. As a result, the App needs to contact the server
every time the user
clicks on any of the Review button. We must change the code to improve the
performance
because the majority of users (in Vietnam, China) will not have fast network
connections (like we
do here in US).
Note: In my other desktop HOXChess app, all the initial 32 pieces are created
at one time and I
never have to create a new Piece during the Table/Game 's life time. When the
Pieces are
captures, they are simply hidden (invisible) from the view.
*** Note: As of now, the BoardCanvas class is too complex because it combines
the UI code with
everything else (like validation, review, ...). We must break this BoardCanvas
into multiple class.
Otherwise, it is too difficult to maintain and to improve.
Original issue reported on code.google.com by huypha...@gmail.com on 6 Nov 2009 at 2:11
Original issue reported on code.google.com by
huypha...@gmail.com
on 6 Nov 2009 at 2:11