added move counting in apply move, endgame check method, next player method