Added preliminary score checking and game ending condition