Calculate move count and position dynamically
Calculate move count and position dynamically

getPosition() and moveCount() returned a value that was updated on every
call of doMove() so far. This would have been likely to cause some bug
later on, when the position could be changed without calling doMove or
something similar.

This problem has been fixed by using the movelist generared by
getMainline() to calculate position and move count on every call of the
respective function.

Just as the rest of the class Game the new function only care for the
mainline and don't support variations yet.

jupiter24/web-chess,jupiter24/web-chess,jupiter24/web-chess,jupiter24/web-chess