thecommons-urbit / chess

Distribution repo for Urbit Chess app
Other
24 stars 8 forks source link

Display material difference #147

Closed rovmug-ticfyn closed 1 year ago

rovmug-ticfyn commented 1 year ago

This is my first pass at calculating material difference on the backend. Still need to go through and edit all places where data needs to be sent to the frontend—along with marks—and add a frontend display.

rovmug-ticfyn commented 1 year ago

Yes, it was certainly more compact on the frontend. The undo logic added even more complexity to this because I decided to just iterate through the position on an undo and rebuild the map of captured pieces.

I think you're right that the frontend version will overall be a lower lift if I can get that algorithm working.