All pastes #995391 Raw Edit

Someone

public java v1 · immutable
#995391 ·published 2008-04-24 03:09 UTC
rendered paste body
/* An instance of this class is used to generate a random move in the Rock Paper Scissors game.*/import java.util.Random;public class RandomPlayer {    //Instance fields go here    private Random move = new Random();    private int playerMove;    //Constructors go here    public RandomPlayer() {	playerMove = move.nextInt(3);    }    //Methods go here    public String getMove() {	String result = null;	if (playerMove == 0) {	    result = "Rock";	}		else if (playerMove == 1) {	    result = "Paper";	}		else {	    result = "Scissors";	}	return result;    } }