Rock-Paper-Scissors Game


As you know, we need a random code and we need a timer to count scores. If you choose rock, computer will choose %50 paper, %50 scissors.

CODES OF THE GAME
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Rock_Paper_Scissors_Game
{
public partial class Form1 : Form
{
int score1;
int score2;
public Form1()
{
InitializeComponent();
}

private int createnumber()
{
Random rastgele = new Random();
int abc = rastgele.Next(1,3);
return abc;
}

private void pictureBox1_Click(object sender, EventArgs e)
{
label3.Visible = true;
int a = createnumber();
label3.Text = a.ToString();
if (a == 1)
{
pictureBox4.Image = pictureBox2.Image;
pictureBox4.Height = pictureBox2.Height;
pictureBox4.Width = pictureBox2.Width;
skor1++;
label3.Text = "Rock breaks scissors.";
}
if (a == 2)
{
pictureBox4.Image = pictureBox3.Image;
pictureBox4.Height = pictureBox3.Height;
pictureBox4.Width = pictureBox3.Width;
skor2++;
label3.Text = "Paper wraps rock.";
}
}

private void pictureBox3_Click(object sender, EventArgs e)
{
label3.Visible = true;
int a = sayiuret();
label3.Text = a.ToString();
if (a == 1)
{
pictureBox4.Image = pictureBox1.Image;
pictureBox4.Height = pictureBox1.Height;
pictureBox4.Width = pictureBox1.Width;
skor1++;
label3.Text = "Paper wraps rock.";
}
if (a == 2)
{
pictureBox4.Image = pictureBox2.Image;
pictureBox4.Height = pictureBox2.Height;
pictureBox4.Width = pictureBox2.Width;
skor2++;
label3.Text = "Scissor cuts paper.";
}
}

private void pictureBox2_Click(object sender, EventArgs e)
{
label3.Visible = true;
int a = sayiuret();
label3.Text = a.ToString();
if (a == 1)
{
pictureBox4.Image = pictureBox1.Image;
pictureBox4.Height = pictureBox1.Height;
pictureBox4.Width = pictureBox1.Width;
skor2++;
label3.Text = "Rock breaks scissors.";
}
if (a == 2)
{
pictureBox4.Image = pictureBox3.Image;
pictureBox4.Height = pictureBox3.Height;
pictureBox4.Width = pictureBox3.Width;
skor1++;
label3.Text = "Scissor cuts paper.";
}
}

private void timer1_Tick(object sender, EventArgs e)
{
label1.Text = "Your Score : " + skor1 + " " + "Computers Score : " + skor2;
}
}
}