Refactor code for how a player makes a move.