[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
I think I found the problem. As you pointed out, it was imitating his own moves rather than those of the user. This used to work correctly before, but with the addition of the function newClick to get a more powerful move-entry interface, this was broken. Because the type to imitates was set in a MakeMove function that was replaced by newClick; and I had not thought of doing this in newClick. (Because that used the AI's function for making moves, which does keep track of the imitated type already. But it tracked this in another variable, 'imi' instead of 'imitatedType', and for a new move the latter is used to initialize imi.
It should work now both in betza.js and betzaNew.js. (Flush browser cache!)