checkGameWasClosed by for loop