Perhaps we should create a new sub-model, 'prelude-model.js', which handles most of the stuff now in metamachy' model and view files, so that any variant with some sort of prelude can draw on it. Metamachy creates wrappers for many of the chessbase standard routines, sometimes only to do something very trivial (like copying an extra proprty in the game state). These tasks could probably be done in base-model.js always, without unduly burdening it in variants without prelude. In fact I don't think the game state needs a 'setupState' property at all; the 'lastMove' property it already has could conveniently be used to communicate which stages of the prelude have already been performed, e.g. by negative numbers in the lastMove.f field.
It should also be possible to provide a table-driven version of a routine that creates a popup showing a number of groups of piece icons, from which the user then can select one to cause calling of a custoSetup routine with the number of the selected setup as a parameter.
Perhaps we should create a new sub-model, 'prelude-model.js', which handles most of the stuff now in metamachy' model and view files, so that any variant with some sort of prelude can draw on it. Metamachy creates wrappers for many of the chessbase standard routines, sometimes only to do something very trivial (like copying an extra proprty in the game state). These tasks could probably be done in base-model.js always, without unduly burdening it in variants without prelude. In fact I don't think the game state needs a 'setupState' property at all; the 'lastMove' property it already has could conveniently be used to communicate which stages of the prelude have already been performed, e.g. by negative numbers in the lastMove.f field.
It should also be possible to provide a table-driven version of a routine that creates a popup showing a number of groups of piece icons, from which the user then can select one to cause calling of a custoSetup routine with the number of the selected setup as a parameter.