handle gameEnd(no more empty cell). Fix logic bug with captured cells