implemented half-move clock counter