Added game ending condition