import java.util.Random; public class ComputerPlayer { private Random r; public ComputerPlayer() { r = new Random(); } public int getNextChoice() { return r.nextInt(3); } }