Thanks for your reply, undr.
To my uninformed opinion it would seem a quite simple thing - except of course for the "save" command.
There are already some examples of gamebooks for the .epub or .mobi formats and, if the gamebooks present in this website are not much more complicated than, say, an html file with hyperlinks to sections of the book, then it would just be just a matter of conversion.
I, for one thing, would be more than happy to pay a fee to download the stories here to use offline on my ereader during my frequent long flights.
Also, if I may, an app version would not interest me as much as I find reading more than a couple of pages on my phone to be quite painful.
Is there a section in this forum where I could download an example "source code" of a typical gamebook?
Thanks again
EDIT:
I see now that other books feature such things as inventories, leveling systems and so on.
Said features are obviously impossible to implement on an ereader.
I see now what you mean and understand the difficulties you mention. Sorry for doubting that, I stand corrected.