Added boolean "endGame"