refactor case statement in computer#take_turn