0. suggestion: move your declaration of 'randomNumberGenerator outside the 'rockButton_Click method. If you leave it in the method, it's going to generate the same seqence every time the method is called until the underlying default "seed" changed. Look up 'Random in the docs, and use a 'seed value that's based on some value that changes, like:
private Random randomNumberGenerator = new Random(System.Environment.TickCount);
1. Create separate top-level variables for UserScore and ComputerScore:
private int UserScore { set; get; }
private int ComputerScore { set; get; }
I used properties here because I expect in the future you may wish to save (serialize) the game. and ...
2. Another use for properties is to use any change in the property value to update UI elements; for example:
public Label lblUserScore;
public Label lblComputerScore;
private int _userscore;
public int UserScore
{
set
{
if(value != _userscore)
{
_userscore = value;
lblUserScore.Text = _userscore.ToString();
}
}
get { return _userscore; }
}
private int _computerscore;
public int ComputerScore
{
set
{
if(value != _computerscore)
{
_computerscore= value;
lblComputerScore.Text = _computerscore.ToString();
}
}
get { return _computerscore; }
}
2. for your 3d-effect buttons you can use a button with a BackGround Image, or a Panel with a background Image. These CodeProject articles will show you a variety of ways to achieve "fancy" buttons: [
^]