Twitter

Wednesday, March 5, 2014

Rock Paper Scissors

Hint:

public RockPaperScissors(String player)
{
int choice = (int)(Math.random()*3);
switch(choice)
{
case 0 : compChoice = "R"; break;
case 1 : compChoice = "P"; break;
case 2 : compChoice = "S"; break;
}
playChoice=player;
}

No comments:

Post a Comment