예제 #1
0
파일: player.py 프로젝트: jming/spring2013
def get_move(view):
  global history

  if history is None:
    history = History(view)
    load_prior()
  else:
    history.updateStatus(view)

  learn() # update the prior

  direction = navigate.goWhere(history, prior)
  shouldeat = eat.shouldEatOrNot(view, history, prior)

  time.sleep(0.1)
  return (direction, shouldeat)