Ah OK, I think I know what you mean. You morph into different pieces than those you placed on the board, once you start playing. Problem is that I currently create the morphs by piece ID, as they would appear in the morph parameter of the Diagram that is produced upon pressing the HTML button. But the table of all available pieces contains many pieces that have the same ID. And the algorithm for interpreting the morph parameter takes the last piece in the list with the given ID (other than the promoting piece itself).
I guess this is a general problem with the Play-Test Applet, when you use it to play on the page itself: it considers the entire list as participating pieces, and this would also wreck interpretation of the promoChoice parameter: it would allow you (or the AI) to promote to non-participating piece types that happen to have the same ID in the table as the participating promotion piece.
I suppose that I should remove all pieces that are not on the board from the table, at some point. That raises the problem for how to indicate participating pieces that are not present in the initial setup. Perhaps I should add a button for that, "Starts off board", so that one could select a piece type in the table, and then press that button instead of selecting a board square. These piece types would then also be left in the table when you press the "Start position" button.
Ah OK, I think I know what you mean. You morph into different pieces than those you placed on the board, once you start playing. Problem is that I currently create the morphs by piece ID, as they would appear in the morph parameter of the Diagram that is produced upon pressing the HTML button. But the table of all available pieces contains many pieces that have the same ID. And the algorithm for interpreting the morph parameter takes the last piece in the list with the given ID (other than the promoting piece itself).
I guess this is a general problem with the Play-Test Applet, when you use it to play on the page itself: it considers the entire list as participating pieces, and this would also wreck interpretation of the promoChoice parameter: it would allow you (or the AI) to promote to non-participating piece types that happen to have the same ID in the table as the participating promotion piece.
I suppose that I should remove all pieces that are not on the board from the table, at some point. That raises the problem for how to indicate participating pieces that are not present in the initial setup. Perhaps I should add a button for that, "Starts off board", so that one could select a piece type in the table, and then press that button instead of selecting a board square. These piece types would then also be left in the table when you press the "Start position" button.