Grant-Nelson / ThreeDart

3D graphical rendering tool for websites written in Dart.
Other
16 stars 11 forks source link

3Dart Chess: Add undo/redo #101

Open Grant-Nelson opened 5 years ago

Grant-Nelson commented 5 years ago

In the Chess Example add two static buttons (images which have pickable colors associated with them) which when clicked perform an undo or redo. Also show the buttons enabled and disabled by either using another image greyed out, use a color matrix to grey out the button image, or by hiding the button when it isn't enabled. The buttons would just hook up to the undo/redo in the game class which already has undo/redo states being stored.

If there is an AI already, then make undo and redo skip over the AI's turn so that it doesn't try to play forward, same with redo. To undo/redo twice use the count parameter to undo/redo.