updating state of position, checkmating, fixing tests