computer will take random moves, handle tie case