Added chooseMove function. May need testing