lichess-org / lichobile

lichess.org mobile application
https://lichess.org/mobile
GNU General Public License v3.0
2.04k stars 318 forks source link

Board editor does not support some variants #1756

Open shabbychef opened 3 years ago

shabbychef commented 3 years ago

When analyzing endgames for Antichess or Hoard, one may wish to proceed from a position without one or both kings. The Board Editor will not allow one to analyze such a position (the microscope icon is inactive). In general the Board Editor seems unaware of variants, which seems problematic ("Starting position" is different for some of them, for example).

shabbychef commented 3 years ago

perhaps related to https://github.com/veloce/lichobile/issues/544

jas14 commented 3 years ago

You've correctly identified that the board editor is not aware of variants - or rather, there's no way to select a variant. (The code already has variant support - it's just the UI that doesn't!)

https://github.com/veloce/lichobile/pull/1832#issuecomment-910824656

... For variant engine analysis, the analysis board needs to know which variant it's looking at. The board editor only supports traditional right now:

https://github.com/veloce/lichobile/blob/6b46b44d6152e16026373cd98e430ce1819e8cd9/src/ui/editor/EditorCtrl.ts#L35-L36

The majority of the problem at this point is developing a good UI/UX for specifying the variant.

shabbychef commented 3 years ago

Yes, I was not sure how that should flow: some positions are valid for some variants, so if you were to play against computer from them, only the valid variants should be available? Alternatively an error is immediately thrown, which seems bad.