You need to tell the
playGame
function that
SEARCH_DEPTH
is a global variable. Otherwise when it gets to the line
SEARCH_DEPTH = int(input("What is your deep? "))
it creates a new local variable with that name, and ignores the one that is declared outside the function. Python's rules are that any variable reference search always starts at the innermost level.
Just add the global command thus:
def playGame():
global SEARCH_DEPTH