SlideShare a Scribd company logo
1 of 19
Download to read offline
I have been working on this ROCK, PAPER, SCISSORS project for the past 6 days or so, and
it's still giving me absolute fits. I have created two pictureBox controls in the designer, and here
is my current source
code:
namespace ROCK_PAPER_SCISSORS_GAME_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
sim iComputer As Integer = 0;
Private iWins As Integer = 0;
Private iDraw As Integer = 0;
Private iLose As Integer = 0;
private void rockButton_Click(object sender, EventArgs e)
{
{
playerLabel.Text = "Rock";
PicBox.Image = "Rock.bmp";
int iComputer = rand.Next(3);
computerLabel.Text = "Paper";
scoreLabel.Text = "You lose!";
iLose = iLose + 1;
}
if (iComputer == 2)
{
pic.Image = "Rock.bmp";
computerLabel.Text = "Rock";
scoreLabel.Text = "Draw!";
iDraw = iDraw + 1;
}
if (iComputer = 3)
{
.Image = "Scissors.bmp";
computerLabel.Text = "Scissors";
scoreLabel.Text = "You win!";
iWins = iWins + 1;
}
{
LabelWins1.Text = iWins;
LabelDraw1.Text = iDraw;
LabelLose1.Text = iLose;
}
}
private void paperButton_Click(object sender, EventArgs e)
{
{
playerLabel.Text = "Paper";
int iComputer = rand.Next(3);
computerLabel.Text = iComputer;
}
if (iComputer == 1)
{
computerLabel.Text = "Paper";
scoreLabel.Text = "Draw";
iDraw = iDraw + 1;
}
if (iComputer == 2)
{
computerLabel.Text = "Paper";
scoreLabel.Text = "Draw";
iDraw = iDraw + 1;
}
if (iComputer == 3)
{
computerLabel.Text = "Scissor";
scoreLabel.Text = "You lose!";
iLose.Text = iLose + 1;
}
{
LabelWins1.Text = iWins;
LabelDraw1.Text = iDraw;
LabelLose1.Text = iLose;
}
}
private void scissorsButton_Click(object sender, EventArgs e)
{
{
int iComputer = rand.Next(3);
computerLabel.Text = iComputer;
LabelWins1.Text = iWins;
LabelDraw1.Text = iDraw;
LabelLose.Text = iLose;
}
if (iComputer == 1)
{
computerLabel.Text = "Paper";
scoreLabel.Text = "You win!";
iWins = iWins + 1;
}
if (iComputer == 2)
{
computerLabel.Text = "Rock";
scoreLabel.Text = "You lose!";
iLose = iLose + 1;
}
if (iComputer == 3)
{
computerLabel.Text = "Scissor";
scoreLabel.Text = "Draw";
iDraw = iDraw + 1;
}
{
LabelWins1.Text = iWins;
LabelDraw1.Text = iDraw;
LabelLose1.Text = iLose;
}
}
private void resetButton_Click(object sender, EventArgs e)
{
iLose = 0;
iDraw = 0;
iWins = 0;
LabelWins1.Text = iWins;
LabelDraw1.Text = iDraw;
LabelLose1.Text = iLose;
playerLabel.Text = "";
computerLabel.Text = "";
picComputer.Image = Nothing;
picPlayer.Image = Nothing;
scoreLabel.Text = "";
}
}
private void DisplayImages(int randomImage, PictureBox picBox)
// Get the current Application working directory.
string imgPath = Environment.CurrentDirectory
+ "picBoxImage";
// Use switch case to display the respective images in PictureBox.
switch (randomImage)
{
case 1:
// picBox.ImageLocation =
// imgPath + "Rock.BMP";
// break;
picBox.Image = ROCK_PAPER_SCISSORS_GAME_2.
Properties.Resources.Rock;
break;
case 2:
// picBox.ImageLocation =
// imgPath + "Paper.BMP";
// break;
picBox.Image = ROCK_PAPER_SCISSORS_GAME_2.
Properties.Resources.Paper;
break;
case 3:
// picBox.ImageLocation =
// imgPath + "Scissors.BMP";
// break;
picBox.Image = ROCK_PAPER_SCISSORS_GAME_2.
Properties.Resources.Scissors;
break;
}
}
}
Solution
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace xyz
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
// Module/method for when player selects rock.
private void rockPictureBox_Click(object sender, EventArgs e)
{
// Declare an integer variable.
int num1;
// Create a Random Object
Random rand = new Random();
// Get the random integer and assign it to num1.
num1 = rand.Next(3) + 1;
// Declare and display each players' moves and the winner.
switch (num1)
{
case 1:
computerTextLabel.Text = "Computer chooses rock";
playerTextLabel.Text = "You have choosen rock.";
winnerTextLabel.Text = "The computer and you have choosen rock. Therefore it is a tie.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = true;
computerPictureBox3.Visible = false;
computerPictureBox4.Visible = false;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = true;
playerPictureBox3.Visible = false;
playerPictureBox4.Visible = false;
break;
case 2:
computerTextLabel.Text = "Computer chooses paper";
playerTextLabel.Text = "You have choosen rock.";
winnerTextLabel.Text = "Paper can smoother a rock. Therefore the computer has won.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = false;
computerPictureBox3.Visible = true;
computerPictureBox4.Visible = false;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = true;
playerPictureBox3.Visible = false;
playerPictureBox4.Visible = false;
break;
case 3:
computerTextLabel.Text = "Computer Chooses scissors";
playerTextLabel.Text = "You have choosen rock.";
winnerTextLabel.Text = "A rock can crush scissors. Therefore, you have won.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = false;
computerPictureBox3.Visible = false;
computerPictureBox4.Visible = true;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = true;
playerPictureBox3.Visible = false;
playerPictureBox4.Visible = false;
break;
}
}
//Module/method for when player selects papaer.
private void paperPictureBox_Click(object sender, EventArgs e)
{
// Declare an integer variable.
int num1;
// Create a Random Object
Random rand = new Random();
// Get the random integer and assign it to num1.
num1 = rand.Next(3) + 1;
// Declare and display each players' moves and the winner.
switch (num1)
{
case 1:
computerTextLabel.Text = "Computer chooses rock.";
playerTextLabel.Text = "You have choosen paper.";
winnerTextLabel.Text = "Paper can smoother a rock. Therefore you have won.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = true;
computerPictureBox3.Visible = false;
computerPictureBox4.Visible = false;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = false;
playerPictureBox3.Visible = true;
playerPictureBox4.Visible = false;
break;
case 2:
computerTextLabel.Text = "Computer chooses paper.";
playerTextLabel.Text = "You have choosen paper.";
winnerTextLabel.Text = "The computer and you have choosen paper. Therefore, it is a tie.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = false;
computerPictureBox3.Visible = true;
computerPictureBox4.Visible = false;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = false;
playerPictureBox3.Visible = true;
playerPictureBox4.Visible = false;
break;
case 3:
computerTextLabel.Text = "Computer Chooses scissors.";
playerTextLabel.Text = "You have choosen paper.";
winnerTextLabel.Text = "Scissors can cut paper. Therefore, the computer has won.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = false;
computerPictureBox3.Visible = false;
computerPictureBox4.Visible = true;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = false;
playerPictureBox3.Visible = true;
playerPictureBox4.Visible = false;
break;
}
}
//Module/Method for when player selects scissors.
private void scissorsPictureBox_Click(object sender, EventArgs e)
{
// Declare an integer variable.
int num1;
// Create a Random Object
Random rand = new Random();
// Get the random integer and assign it to num1.
num1 = rand.Next(3) + 1;
// Declare and display each players' moves and the winner.
switch (num1)
{
case 1:
computerTextLabel.Text = "Computer chooses rock.";
playerTextLabel.Text = "You have choosen scissors.";
winnerTextLabel.Text = "A rock can crush scissors. Therefore, the computer has won.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = true;
computerPictureBox3.Visible = false;
computerPictureBox4.Visible = false;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = false;
playerPictureBox3.Visible = false;
playerPictureBox4.Visible = true;
break;
case 2:
computerTextLabel.Text = "Computer chooses paper.";
playerTextLabel.Text = "You have choosen scissors.";
winnerTextLabel.Text = "Scissors can cut paper. Therefore, you have won.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = false;
computerPictureBox3.Visible = true;
computerPictureBox4.Visible = false;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = false;
playerPictureBox3.Visible = false;
playerPictureBox4.Visible = true;
break;
case 3:
computerTextLabel.Text = "Computer Chooses scissors.";
playerTextLabel.Text = "You have choosen scissors.";
winnerTextLabel.Text = "The computer and you have choosen scissors. Therefore, it is a tie.";
computerPictureBox1.Visible = false;
computerPictureBox2.Visible = false;
computerPictureBox3.Visible = false;
computerPictureBox4.Visible = true;
playerPictureBox1.Visible = false;
playerPictureBox2.Visible = false;
playerPictureBox3.Visible = false;
playerPictureBox4.Visible = true;
break;
}
}
private void exitButton_Click(object sender, EventArgs e)
{
// Close the form.
this.Close();
}
}
}
---------------------------------------------form1 design
namespace xyz
{
partial class Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.choosePictureBox = new System.Windows.Forms.PictureBox();
this.scissorsPictureBox = new System.Windows.Forms.PictureBox();
this.paperPictureBox = new System.Windows.Forms.PictureBox();
this.rockPictureBox = new System.Windows.Forms.PictureBox();
this.computerPictureBox4 = new System.Windows.Forms.PictureBox();
this.computerPictureBox3 = new System.Windows.Forms.PictureBox();
this.computerPictureBox2 = new System.Windows.Forms.PictureBox();
this.computerPictureBox1 = new System.Windows.Forms.PictureBox();
this.playerPictureBox4 = new System.Windows.Forms.PictureBox();
this.playerPictureBox3 = new System.Windows.Forms.PictureBox();
this.playerPictureBox2 = new System.Windows.Forms.PictureBox();
this.playerPictureBox1 = new System.Windows.Forms.PictureBox();
this.exitButton = new System.Windows.Forms.Button();
this.introTextLabel = new System.Windows.Forms.Label();
this.computerTextLabel = new System.Windows.Forms.Label();
this.playerTextLabel = new System.Windows.Forms.Label();
this.winnerTextLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.choosePictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.scissorsPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.paperPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rockPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox1)).BeginInit();
this.SuspendLayout();
//
// choosePictureBox
//
this.choosePictureBox.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.choosePictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.choosePictureBox.Location = new System.Drawing.Point(167, 67);
this.choosePictureBox.Name = "choosePictureBox";
this.choosePictureBox.Size = new System.Drawing.Size(263, 90);
this.choosePictureBox.TabIndex = 0;
this.choosePictureBox.TabStop = false;
//
// scissorsPictureBox
//
this.scissorsPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.scissorsPictureBox.Image =
((System.Drawing.Image)(resources.GetObject("scissorsPictureBox.Image")));
this.scissorsPictureBox.Location = new System.Drawing.Point(347, 79);
this.scissorsPictureBox.Name = "scissorsPictureBox";
this.scissorsPictureBox.Size = new System.Drawing.Size(64, 65);
this.scissorsPictureBox.TabIndex = 1;
this.scissorsPictureBox.TabStop = false;
this.scissorsPictureBox.Click += new System.EventHandler(this.scissorsPictureBox_Click);
//
// paperPictureBox
//
this.paperPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.paperPictureBox.Image =
((System.Drawing.Image)(resources.GetObject("paperPictureBox.Image")));
this.paperPictureBox.Location = new System.Drawing.Point(266, 79);
this.paperPictureBox.Name = "paperPictureBox";
this.paperPictureBox.Size = new System.Drawing.Size(64, 65);
this.paperPictureBox.TabIndex = 2;
this.paperPictureBox.TabStop = false;
this.paperPictureBox.Click += new System.EventHandler(this.paperPictureBox_Click);
//
// rockPictureBox
//
this.rockPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.rockPictureBox.Image =
((System.Drawing.Image)(resources.GetObject("rockPictureBox.Image")));
this.rockPictureBox.Location = new System.Drawing.Point(186, 79);
this.rockPictureBox.Name = "rockPictureBox";
this.rockPictureBox.Size = new System.Drawing.Size(64, 65);
this.rockPictureBox.TabIndex = 3;
this.rockPictureBox.TabStop = false;
this.rockPictureBox.Click += new System.EventHandler(this.rockPictureBox_Click);
//
// computerPictureBox4
//
this.computerPictureBox4.Image =
((System.Drawing.Image)(resources.GetObject("computerPictureBox4.Image")));
this.computerPictureBox4.Location = new System.Drawing.Point(186, 166);
this.computerPictureBox4.Name = "computerPictureBox4";
this.computerPictureBox4.Size = new System.Drawing.Size(64, 65);
this.computerPictureBox4.TabIndex = 4;
this.computerPictureBox4.TabStop = false;
this.computerPictureBox4.Visible = false;
//
// computerPictureBox3
//
this.computerPictureBox3.Image =
((System.Drawing.Image)(resources.GetObject("computerPictureBox3.Image")));
this.computerPictureBox3.Location = new System.Drawing.Point(186, 166);
this.computerPictureBox3.Name = "computerPictureBox3";
this.computerPictureBox3.Size = new System.Drawing.Size(64, 65);
this.computerPictureBox3.TabIndex = 5;
this.computerPictureBox3.TabStop = false;
this.computerPictureBox3.Visible = false;
//
// computerPictureBox2
//
this.computerPictureBox2.Image =
((System.Drawing.Image)(resources.GetObject("computerPictureBox2.Image")));
this.computerPictureBox2.Location = new System.Drawing.Point(186, 166);
this.computerPictureBox2.Name = "computerPictureBox2";
this.computerPictureBox2.Size = new System.Drawing.Size(64, 65);
this.computerPictureBox2.TabIndex = 6;
this.computerPictureBox2.TabStop = false;
this.computerPictureBox2.Visible = false;
//
// computerPictureBox1
//
this.computerPictureBox1.Image =
((System.Drawing.Image)(resources.GetObject("computerPictureBox1.Image")));
this.computerPictureBox1.Location = new System.Drawing.Point(186, 166);
this.computerPictureBox1.Name = "computerPictureBox1";
this.computerPictureBox1.Size = new System.Drawing.Size(64, 65);
this.computerPictureBox1.TabIndex = 7;
this.computerPictureBox1.TabStop = false;
//
// playerPictureBox4
//
this.playerPictureBox4.Image =
((System.Drawing.Image)(resources.GetObject("playerPictureBox4.Image")));
this.playerPictureBox4.Location = new System.Drawing.Point(347, 166);
this.playerPictureBox4.Name = "playerPictureBox4";
this.playerPictureBox4.Size = new System.Drawing.Size(64, 65);
this.playerPictureBox4.TabIndex = 8;
this.playerPictureBox4.TabStop = false;
this.playerPictureBox4.Visible = false;
//
// playerPictureBox3
//
this.playerPictureBox3.Image =
((System.Drawing.Image)(resources.GetObject("playerPictureBox3.Image")));
this.playerPictureBox3.Location = new System.Drawing.Point(347, 166);
this.playerPictureBox3.Name = "playerPictureBox3";
this.playerPictureBox3.Size = new System.Drawing.Size(64, 65);
this.playerPictureBox3.TabIndex = 9;
this.playerPictureBox3.TabStop = false;
this.playerPictureBox3.Visible = false;
//
// playerPictureBox2
//
this.playerPictureBox2.Image =
((System.Drawing.Image)(resources.GetObject("playerPictureBox2.Image")));
this.playerPictureBox2.Location = new System.Drawing.Point(347, 166);
this.playerPictureBox2.Name = "playerPictureBox2";
this.playerPictureBox2.Size = new System.Drawing.Size(64, 65);
this.playerPictureBox2.TabIndex = 10;
this.playerPictureBox2.TabStop = false;
this.playerPictureBox2.Visible = false;
//
// playerPictureBox1
//
this.playerPictureBox1.Image =
((System.Drawing.Image)(resources.GetObject("playerPictureBox1.Image")));
this.playerPictureBox1.Location = new System.Drawing.Point(347, 166);
this.playerPictureBox1.Name = "playerPictureBox1";
this.playerPictureBox1.Size = new System.Drawing.Size(64, 65);
this.playerPictureBox1.TabIndex = 11;
this.playerPictureBox1.TabStop = false;
//
// exitButton
//
this.exitButton.Location = new System.Drawing.Point(266, 372);
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(75, 23);
this.exitButton.TabIndex = 12;
this.exitButton.Text = "Exit";
this.exitButton.UseVisualStyleBackColor = true;
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
//
// introTextLabel
//
this.introTextLabel.AutoSize = true;
this.introTextLabel.Location = new System.Drawing.Point(164, 12);
this.introTextLabel.Name = "introTextLabel";
this.introTextLabel.Size = new System.Drawing.Size(286, 52);
this.introTextLabel.TabIndex = 13;
this.introTextLabel.Text = "To begin play, make the first move by choosing a selection.  To
make an selection" +
", click on an image below. To quit,  select Exit below.    ";
//
// computerTextLabel
//
this.computerTextLabel.AutoSize = true;
this.computerTextLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.computerTextLabel.Location = new System.Drawing.Point(116, 234);
this.computerTextLabel.Name = "computerTextLabel";
this.computerTextLabel.Size = new System.Drawing.Size(0, 16);
this.computerTextLabel.TabIndex = 14;
this.computerTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// playerTextLabel
//
this.playerTextLabel.AutoSize = true;
this.playerTextLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.playerTextLabel.Location = new System.Drawing.Point(312, 234);
this.playerTextLabel.Name = "playerTextLabel";
this.playerTextLabel.Size = new System.Drawing.Size(0, 16);
this.playerTextLabel.TabIndex = 15;
this.playerTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// winnerTextLabel
//
this.winnerTextLabel.AutoSize = true;
this.winnerTextLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.winnerTextLabel.Location = new System.Drawing.Point(10, 310);
this.winnerTextLabel.Name = "winnerTextLabel";
this.winnerTextLabel.Size = new System.Drawing.Size(0, 24);
this.winnerTextLabel.TabIndex = 16;
this.winnerTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(614, 418);
this.Controls.Add(this.winnerTextLabel);
this.Controls.Add(this.playerTextLabel);
this.Controls.Add(this.computerTextLabel);
this.Controls.Add(this.introTextLabel);
this.Controls.Add(this.exitButton);
this.Controls.Add(this.playerPictureBox1);
this.Controls.Add(this.playerPictureBox2);
this.Controls.Add(this.playerPictureBox3);
this.Controls.Add(this.playerPictureBox4);
this.Controls.Add(this.computerPictureBox1);
this.Controls.Add(this.computerPictureBox2);
this.Controls.Add(this.computerPictureBox3);
this.Controls.Add(this.computerPictureBox4);
this.Controls.Add(this.rockPictureBox);
this.Controls.Add(this.paperPictureBox);
this.Controls.Add(this.scissorsPictureBox);
this.Controls.Add(this.choosePictureBox);
this.Name = "Form1";
this.Text = "Rocks Paper Scissors";
((System.ComponentModel.ISupportInitialize)(this.choosePictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.scissorsPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.paperPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.rockPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.computerPictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.playerPictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox choosePictureBox;
private System.Windows.Forms.PictureBox scissorsPictureBox;
private System.Windows.Forms.PictureBox paperPictureBox;
private System.Windows.Forms.PictureBox rockPictureBox;
private System.Windows.Forms.PictureBox computerPictureBox4;
private System.Windows.Forms.PictureBox computerPictureBox3;
private System.Windows.Forms.PictureBox computerPictureBox2;
private System.Windows.Forms.PictureBox computerPictureBox1;
private System.Windows.Forms.PictureBox playerPictureBox4;
private System.Windows.Forms.PictureBox playerPictureBox3;
private System.Windows.Forms.PictureBox playerPictureBox2;
private System.Windows.Forms.PictureBox playerPictureBox1;
private System.Windows.Forms.Button exitButton;
private System.Windows.Forms.Label introTextLabel;
private System.Windows.Forms.Label computerTextLabel;
private System.Windows.Forms.Label playerTextLabel;
private System.Windows.Forms.Label winnerTextLabel;
}
}
--------------------------------------program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace xyz
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

More Related Content

Similar to I have been working on this ROCK, PAPER, SCISSORS project for the pa.pdf

ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityGilbert Guerrero
Β 
Unity3 d devfest-2014
Unity3 d devfest-2014Unity3 d devfest-2014
Unity3 d devfest-2014Vincenzo Favara
Β 
Fps tutorial 2
Fps tutorial 2Fps tutorial 2
Fps tutorial 2unityshare
Β 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfudit652068
Β 
JavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptJavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptLaurence Svekis βœ”
Β 
need help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdfneed help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdfarcotstarsports
Β 
Magic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docx
Magic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docxMagic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docx
Magic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docxcroysierkathey
Β 
Y1 gd level_designworkflow
Y1 gd level_designworkflowY1 gd level_designworkflow
Y1 gd level_designworkflowcrisgalliano
Β 
International News | World News
International News | World NewsInternational News | World News
International News | World Newscojocarujanosko
Β 
Interaksi obyek
Interaksi obyekInteraksi obyek
Interaksi obyekFajar Baskoro
Β 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Korhan Bircan
Β 
How to make a video game
How to make a video gameHow to make a video game
How to make a video gamedandylion13
Β 
Cocos2dx 7.1-7.2
Cocos2dx 7.1-7.2Cocos2dx 7.1-7.2
Cocos2dx 7.1-7.2Kyungryul KIM
Β 
Chapter ii(coding)
Chapter ii(coding)Chapter ii(coding)
Chapter ii(coding)Chhom Karath
Β 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeLaurence Svekis βœ”
Β 

Similar to I have been working on this ROCK, PAPER, SCISSORS project for the pa.pdf (20)

Game dev 101 part 3
Game dev 101 part 3Game dev 101 part 3
Game dev 101 part 3
Β 
ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting Interactivity
Β 
Unity3 d devfest-2014
Unity3 d devfest-2014Unity3 d devfest-2014
Unity3 d devfest-2014
Β 
LCS35
LCS35LCS35
LCS35
Β 
Fps tutorial 2
Fps tutorial 2Fps tutorial 2
Fps tutorial 2
Β 
Flappy bird
Flappy birdFlappy bird
Flappy bird
Β 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Β 
JavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptJavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScript
Β 
need help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdfneed help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdf
Β 
Magic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docx
Magic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docxMagic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docx
Magic Game ClassesMagicAnimalTriviaTrivia.cppMagic Game Classe.docx
Β 
Y1 gd level_designworkflow
Y1 gd level_designworkflowY1 gd level_designworkflow
Y1 gd level_designworkflow
Β 
International News | World News
International News | World NewsInternational News | World News
International News | World News
Β 
Interaksi obyek
Interaksi obyekInteraksi obyek
Interaksi obyek
Β 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)
Β 
Windows Phone Launchers and Choosers
Windows Phone Launchers and ChoosersWindows Phone Launchers and Choosers
Windows Phone Launchers and Choosers
Β 
How to make a video game
How to make a video gameHow to make a video game
How to make a video game
Β 
Cocos2dx 7.1-7.2
Cocos2dx 7.1-7.2Cocos2dx 7.1-7.2
Cocos2dx 7.1-7.2
Β 
Chapter ii(coding)
Chapter ii(coding)Chapter ii(coding)
Chapter ii(coding)
Β 
RandomGuessingGame
RandomGuessingGameRandomGuessingGame
RandomGuessingGame
Β 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Β 

More from fasttracksunglass

Describe tolerance as a immunologic function. What is the consequenc.pdf
Describe tolerance as a immunologic function. What is the consequenc.pdfDescribe tolerance as a immunologic function. What is the consequenc.pdf
Describe tolerance as a immunologic function. What is the consequenc.pdffasttracksunglass
Β 
Answer the following question about human evolution as inferred from.pdf
Answer the following question about human evolution as inferred from.pdfAnswer the following question about human evolution as inferred from.pdf
Answer the following question about human evolution as inferred from.pdffasttracksunglass
Β 
40.Classification of a network as a LAN or a WAN is not relevant to .pdf
40.Classification of a network as a LAN or a WAN is not relevant to .pdf40.Classification of a network as a LAN or a WAN is not relevant to .pdf
40.Classification of a network as a LAN or a WAN is not relevant to .pdffasttracksunglass
Β 
12.9 Program Online shopping cart (continued) (C++)This program e.pdf
12.9 Program Online shopping cart (continued) (C++)This program e.pdf12.9 Program Online shopping cart (continued) (C++)This program e.pdf
12.9 Program Online shopping cart (continued) (C++)This program e.pdffasttracksunglass
Β 
A sterile item is free ofmicrobes.endospores.viruses.prions..pdf
A sterile item is free ofmicrobes.endospores.viruses.prions..pdfA sterile item is free ofmicrobes.endospores.viruses.prions..pdf
A sterile item is free ofmicrobes.endospores.viruses.prions..pdffasttracksunglass
Β 
Both mitochondria and chloroplasts... A. obtain electrons from water .pdf
Both mitochondria and chloroplasts... A. obtain electrons from water .pdfBoth mitochondria and chloroplasts... A. obtain electrons from water .pdf
Both mitochondria and chloroplasts... A. obtain electrons from water .pdffasttracksunglass
Β 
Please answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdf
Please answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdfPlease answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdf
Please answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdffasttracksunglass
Β 
Low platelet count it a recessively inherited trait. Reevaluation of .pdf
Low platelet count it a recessively inherited trait. Reevaluation of .pdfLow platelet count it a recessively inherited trait. Reevaluation of .pdf
Low platelet count it a recessively inherited trait. Reevaluation of .pdffasttracksunglass
Β 
Lists can contain other lists as elements. For example the list HAIR.pdf
Lists can contain other lists as elements. For example the list HAIR.pdfLists can contain other lists as elements. For example the list HAIR.pdf
Lists can contain other lists as elements. For example the list HAIR.pdffasttracksunglass
Β 
Match the modified stem to its correct definition.StolonRhizome.pdf
Match the modified stem to its correct definition.StolonRhizome.pdfMatch the modified stem to its correct definition.StolonRhizome.pdf
Match the modified stem to its correct definition.StolonRhizome.pdffasttracksunglass
Β 
JAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdfJAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdffasttracksunglass
Β 
Let (X,T) be a topological space,.A subset X. Suppose that for all x .pdf
Let (X,T) be a topological space,.A subset X. Suppose that for all x .pdfLet (X,T) be a topological space,.A subset X. Suppose that for all x .pdf
Let (X,T) be a topological space,.A subset X. Suppose that for all x .pdffasttracksunglass
Β 
Choose the best possible answer for each of the following multiple ch.pdf
Choose the best possible answer for each of the following multiple ch.pdfChoose the best possible answer for each of the following multiple ch.pdf
Choose the best possible answer for each of the following multiple ch.pdffasttracksunglass
Β 
If T is a bounded and self-adjoint operator on a Hilbert space and T_.pdf
If T is a bounded and self-adjoint operator on a Hilbert space and T_.pdfIf T is a bounded and self-adjoint operator on a Hilbert space and T_.pdf
If T is a bounded and self-adjoint operator on a Hilbert space and T_.pdffasttracksunglass
Β 

More from fasttracksunglass (14)

Describe tolerance as a immunologic function. What is the consequenc.pdf
Describe tolerance as a immunologic function. What is the consequenc.pdfDescribe tolerance as a immunologic function. What is the consequenc.pdf
Describe tolerance as a immunologic function. What is the consequenc.pdf
Β 
Answer the following question about human evolution as inferred from.pdf
Answer the following question about human evolution as inferred from.pdfAnswer the following question about human evolution as inferred from.pdf
Answer the following question about human evolution as inferred from.pdf
Β 
40.Classification of a network as a LAN or a WAN is not relevant to .pdf
40.Classification of a network as a LAN or a WAN is not relevant to .pdf40.Classification of a network as a LAN or a WAN is not relevant to .pdf
40.Classification of a network as a LAN or a WAN is not relevant to .pdf
Β 
12.9 Program Online shopping cart (continued) (C++)This program e.pdf
12.9 Program Online shopping cart (continued) (C++)This program e.pdf12.9 Program Online shopping cart (continued) (C++)This program e.pdf
12.9 Program Online shopping cart (continued) (C++)This program e.pdf
Β 
A sterile item is free ofmicrobes.endospores.viruses.prions..pdf
A sterile item is free ofmicrobes.endospores.viruses.prions..pdfA sterile item is free ofmicrobes.endospores.viruses.prions..pdf
A sterile item is free ofmicrobes.endospores.viruses.prions..pdf
Β 
Both mitochondria and chloroplasts... A. obtain electrons from water .pdf
Both mitochondria and chloroplasts... A. obtain electrons from water .pdfBoth mitochondria and chloroplasts... A. obtain electrons from water .pdf
Both mitochondria and chloroplasts... A. obtain electrons from water .pdf
Β 
Please answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdf
Please answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdfPlease answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdf
Please answer all parts thank you!Parents PrPr YY rr xΒ Β  PrPr.pdf
Β 
Low platelet count it a recessively inherited trait. Reevaluation of .pdf
Low platelet count it a recessively inherited trait. Reevaluation of .pdfLow platelet count it a recessively inherited trait. Reevaluation of .pdf
Low platelet count it a recessively inherited trait. Reevaluation of .pdf
Β 
Lists can contain other lists as elements. For example the list HAIR.pdf
Lists can contain other lists as elements. For example the list HAIR.pdfLists can contain other lists as elements. For example the list HAIR.pdf
Lists can contain other lists as elements. For example the list HAIR.pdf
Β 
Match the modified stem to its correct definition.StolonRhizome.pdf
Match the modified stem to its correct definition.StolonRhizome.pdfMatch the modified stem to its correct definition.StolonRhizome.pdf
Match the modified stem to its correct definition.StolonRhizome.pdf
Β 
JAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdfJAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdf
Β 
Let (X,T) be a topological space,.A subset X. Suppose that for all x .pdf
Let (X,T) be a topological space,.A subset X. Suppose that for all x .pdfLet (X,T) be a topological space,.A subset X. Suppose that for all x .pdf
Let (X,T) be a topological space,.A subset X. Suppose that for all x .pdf
Β 
Choose the best possible answer for each of the following multiple ch.pdf
Choose the best possible answer for each of the following multiple ch.pdfChoose the best possible answer for each of the following multiple ch.pdf
Choose the best possible answer for each of the following multiple ch.pdf
Β 
If T is a bounded and self-adjoint operator on a Hilbert space and T_.pdf
If T is a bounded and self-adjoint operator on a Hilbert space and T_.pdfIf T is a bounded and self-adjoint operator on a Hilbert space and T_.pdf
If T is a bounded and self-adjoint operator on a Hilbert space and T_.pdf
Β 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
Β 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
Β 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
Β 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
Β 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
Β 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
Β 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
Β 
β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
Β 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
Β 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
Β 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
Β 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
Β 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
Β 

Recently uploaded (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
Β 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Β 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Β 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
Β 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
Β 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
Β 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Β 
β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
β€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
Β 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Β 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
Β 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Β 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
Β 
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Β 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
Β 
Model Call Girl in Bikash Puri Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Bikash Puri  Delhi reach out to us at πŸ”9953056974πŸ”Model Call Girl in Bikash Puri  Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Bikash Puri Delhi reach out to us at πŸ”9953056974πŸ”
Β 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
Β 

I have been working on this ROCK, PAPER, SCISSORS project for the pa.pdf

  • 1. I have been working on this ROCK, PAPER, SCISSORS project for the past 6 days or so, and it's still giving me absolute fits. I have created two pictureBox controls in the designer, and here is my current source code: namespace ROCK_PAPER_SCISSORS_GAME_2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } sim iComputer As Integer = 0; Private iWins As Integer = 0; Private iDraw As Integer = 0; Private iLose As Integer = 0; private void rockButton_Click(object sender, EventArgs e) { { playerLabel.Text = "Rock"; PicBox.Image = "Rock.bmp"; int iComputer = rand.Next(3); computerLabel.Text = "Paper"; scoreLabel.Text = "You lose!"; iLose = iLose + 1; } if (iComputer == 2) { pic.Image = "Rock.bmp"; computerLabel.Text = "Rock"; scoreLabel.Text = "Draw!"; iDraw = iDraw + 1; }
  • 2. if (iComputer = 3) { .Image = "Scissors.bmp"; computerLabel.Text = "Scissors"; scoreLabel.Text = "You win!"; iWins = iWins + 1; } { LabelWins1.Text = iWins; LabelDraw1.Text = iDraw; LabelLose1.Text = iLose; } } private void paperButton_Click(object sender, EventArgs e) { { playerLabel.Text = "Paper"; int iComputer = rand.Next(3); computerLabel.Text = iComputer; } if (iComputer == 1) { computerLabel.Text = "Paper"; scoreLabel.Text = "Draw"; iDraw = iDraw + 1; } if (iComputer == 2) { computerLabel.Text = "Paper"; scoreLabel.Text = "Draw"; iDraw = iDraw + 1; } if (iComputer == 3) { computerLabel.Text = "Scissor"; scoreLabel.Text = "You lose!";
  • 3. iLose.Text = iLose + 1; } { LabelWins1.Text = iWins; LabelDraw1.Text = iDraw; LabelLose1.Text = iLose; } } private void scissorsButton_Click(object sender, EventArgs e) { { int iComputer = rand.Next(3); computerLabel.Text = iComputer; LabelWins1.Text = iWins; LabelDraw1.Text = iDraw; LabelLose.Text = iLose; } if (iComputer == 1) { computerLabel.Text = "Paper"; scoreLabel.Text = "You win!"; iWins = iWins + 1; } if (iComputer == 2) { computerLabel.Text = "Rock"; scoreLabel.Text = "You lose!"; iLose = iLose + 1; } if (iComputer == 3) { computerLabel.Text = "Scissor"; scoreLabel.Text = "Draw"; iDraw = iDraw + 1; } {
  • 4. LabelWins1.Text = iWins; LabelDraw1.Text = iDraw; LabelLose1.Text = iLose; } } private void resetButton_Click(object sender, EventArgs e) { iLose = 0; iDraw = 0; iWins = 0; LabelWins1.Text = iWins; LabelDraw1.Text = iDraw; LabelLose1.Text = iLose; playerLabel.Text = ""; computerLabel.Text = ""; picComputer.Image = Nothing; picPlayer.Image = Nothing; scoreLabel.Text = ""; } } private void DisplayImages(int randomImage, PictureBox picBox) // Get the current Application working directory. string imgPath = Environment.CurrentDirectory + "picBoxImage"; // Use switch case to display the respective images in PictureBox. switch (randomImage) { case 1: // picBox.ImageLocation = // imgPath + "Rock.BMP"; // break; picBox.Image = ROCK_PAPER_SCISSORS_GAME_2. Properties.Resources.Rock; break; case 2:
  • 5. // picBox.ImageLocation = // imgPath + "Paper.BMP"; // break; picBox.Image = ROCK_PAPER_SCISSORS_GAME_2. Properties.Resources.Paper; break; case 3: // picBox.ImageLocation = // imgPath + "Scissors.BMP"; // break; picBox.Image = ROCK_PAPER_SCISSORS_GAME_2. Properties.Resources.Scissors; break; } } } Solution using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace xyz { public partial class Form1 : Form { public Form1() {
  • 6. InitializeComponent(); } // Module/method for when player selects rock. private void rockPictureBox_Click(object sender, EventArgs e) { // Declare an integer variable. int num1; // Create a Random Object Random rand = new Random(); // Get the random integer and assign it to num1. num1 = rand.Next(3) + 1; // Declare and display each players' moves and the winner. switch (num1) { case 1: computerTextLabel.Text = "Computer chooses rock"; playerTextLabel.Text = "You have choosen rock."; winnerTextLabel.Text = "The computer and you have choosen rock. Therefore it is a tie."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = true; computerPictureBox3.Visible = false; computerPictureBox4.Visible = false; playerPictureBox1.Visible = false; playerPictureBox2.Visible = true; playerPictureBox3.Visible = false; playerPictureBox4.Visible = false; break; case 2: computerTextLabel.Text = "Computer chooses paper"; playerTextLabel.Text = "You have choosen rock."; winnerTextLabel.Text = "Paper can smoother a rock. Therefore the computer has won."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = false; computerPictureBox3.Visible = true; computerPictureBox4.Visible = false;
  • 7. playerPictureBox1.Visible = false; playerPictureBox2.Visible = true; playerPictureBox3.Visible = false; playerPictureBox4.Visible = false; break; case 3: computerTextLabel.Text = "Computer Chooses scissors"; playerTextLabel.Text = "You have choosen rock."; winnerTextLabel.Text = "A rock can crush scissors. Therefore, you have won."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = false; computerPictureBox3.Visible = false; computerPictureBox4.Visible = true; playerPictureBox1.Visible = false; playerPictureBox2.Visible = true; playerPictureBox3.Visible = false; playerPictureBox4.Visible = false; break; } } //Module/method for when player selects papaer. private void paperPictureBox_Click(object sender, EventArgs e) { // Declare an integer variable. int num1; // Create a Random Object Random rand = new Random(); // Get the random integer and assign it to num1. num1 = rand.Next(3) + 1; // Declare and display each players' moves and the winner. switch (num1) { case 1: computerTextLabel.Text = "Computer chooses rock."; playerTextLabel.Text = "You have choosen paper."; winnerTextLabel.Text = "Paper can smoother a rock. Therefore you have won.";
  • 8. computerPictureBox1.Visible = false; computerPictureBox2.Visible = true; computerPictureBox3.Visible = false; computerPictureBox4.Visible = false; playerPictureBox1.Visible = false; playerPictureBox2.Visible = false; playerPictureBox3.Visible = true; playerPictureBox4.Visible = false; break; case 2: computerTextLabel.Text = "Computer chooses paper."; playerTextLabel.Text = "You have choosen paper."; winnerTextLabel.Text = "The computer and you have choosen paper. Therefore, it is a tie."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = false; computerPictureBox3.Visible = true; computerPictureBox4.Visible = false; playerPictureBox1.Visible = false; playerPictureBox2.Visible = false; playerPictureBox3.Visible = true; playerPictureBox4.Visible = false; break; case 3: computerTextLabel.Text = "Computer Chooses scissors."; playerTextLabel.Text = "You have choosen paper."; winnerTextLabel.Text = "Scissors can cut paper. Therefore, the computer has won."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = false; computerPictureBox3.Visible = false; computerPictureBox4.Visible = true; playerPictureBox1.Visible = false; playerPictureBox2.Visible = false; playerPictureBox3.Visible = true; playerPictureBox4.Visible = false; break; }
  • 9. } //Module/Method for when player selects scissors. private void scissorsPictureBox_Click(object sender, EventArgs e) { // Declare an integer variable. int num1; // Create a Random Object Random rand = new Random(); // Get the random integer and assign it to num1. num1 = rand.Next(3) + 1; // Declare and display each players' moves and the winner. switch (num1) { case 1: computerTextLabel.Text = "Computer chooses rock."; playerTextLabel.Text = "You have choosen scissors."; winnerTextLabel.Text = "A rock can crush scissors. Therefore, the computer has won."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = true; computerPictureBox3.Visible = false; computerPictureBox4.Visible = false; playerPictureBox1.Visible = false; playerPictureBox2.Visible = false; playerPictureBox3.Visible = false; playerPictureBox4.Visible = true; break; case 2: computerTextLabel.Text = "Computer chooses paper."; playerTextLabel.Text = "You have choosen scissors."; winnerTextLabel.Text = "Scissors can cut paper. Therefore, you have won."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = false; computerPictureBox3.Visible = true; computerPictureBox4.Visible = false; playerPictureBox1.Visible = false; playerPictureBox2.Visible = false;
  • 10. playerPictureBox3.Visible = false; playerPictureBox4.Visible = true; break; case 3: computerTextLabel.Text = "Computer Chooses scissors."; playerTextLabel.Text = "You have choosen scissors."; winnerTextLabel.Text = "The computer and you have choosen scissors. Therefore, it is a tie."; computerPictureBox1.Visible = false; computerPictureBox2.Visible = false; computerPictureBox3.Visible = false; computerPictureBox4.Visible = true; playerPictureBox1.Visible = false; playerPictureBox2.Visible = false; playerPictureBox3.Visible = false; playerPictureBox4.Visible = true; break; } } private void exitButton_Click(object sender, EventArgs e) { // Close the form. this.Close(); } } } ---------------------------------------------form1 design namespace xyz { partial class Form1 { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used.
  • 11. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.choosePictureBox = new System.Windows.Forms.PictureBox(); this.scissorsPictureBox = new System.Windows.Forms.PictureBox(); this.paperPictureBox = new System.Windows.Forms.PictureBox(); this.rockPictureBox = new System.Windows.Forms.PictureBox(); this.computerPictureBox4 = new System.Windows.Forms.PictureBox(); this.computerPictureBox3 = new System.Windows.Forms.PictureBox(); this.computerPictureBox2 = new System.Windows.Forms.PictureBox(); this.computerPictureBox1 = new System.Windows.Forms.PictureBox(); this.playerPictureBox4 = new System.Windows.Forms.PictureBox(); this.playerPictureBox3 = new System.Windows.Forms.PictureBox(); this.playerPictureBox2 = new System.Windows.Forms.PictureBox(); this.playerPictureBox1 = new System.Windows.Forms.PictureBox(); this.exitButton = new System.Windows.Forms.Button(); this.introTextLabel = new System.Windows.Forms.Label(); this.computerTextLabel = new System.Windows.Forms.Label(); this.playerTextLabel = new System.Windows.Forms.Label(); this.winnerTextLabel = new System.Windows.Forms.Label();
  • 12. ((System.ComponentModel.ISupportInitialize)(this.choosePictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.scissorsPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.paperPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rockPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox1)).BeginInit(); this.SuspendLayout(); // // choosePictureBox // this.choosePictureBox.BackColor = System.Drawing.SystemColors.ControlDarkDark; this.choosePictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.choosePictureBox.Location = new System.Drawing.Point(167, 67); this.choosePictureBox.Name = "choosePictureBox"; this.choosePictureBox.Size = new System.Drawing.Size(263, 90); this.choosePictureBox.TabIndex = 0; this.choosePictureBox.TabStop = false; // // scissorsPictureBox // this.scissorsPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.scissorsPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("scissorsPictureBox.Image"))); this.scissorsPictureBox.Location = new System.Drawing.Point(347, 79); this.scissorsPictureBox.Name = "scissorsPictureBox"; this.scissorsPictureBox.Size = new System.Drawing.Size(64, 65); this.scissorsPictureBox.TabIndex = 1; this.scissorsPictureBox.TabStop = false; this.scissorsPictureBox.Click += new System.EventHandler(this.scissorsPictureBox_Click); //
  • 13. // paperPictureBox // this.paperPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.paperPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("paperPictureBox.Image"))); this.paperPictureBox.Location = new System.Drawing.Point(266, 79); this.paperPictureBox.Name = "paperPictureBox"; this.paperPictureBox.Size = new System.Drawing.Size(64, 65); this.paperPictureBox.TabIndex = 2; this.paperPictureBox.TabStop = false; this.paperPictureBox.Click += new System.EventHandler(this.paperPictureBox_Click); // // rockPictureBox // this.rockPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.rockPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("rockPictureBox.Image"))); this.rockPictureBox.Location = new System.Drawing.Point(186, 79); this.rockPictureBox.Name = "rockPictureBox"; this.rockPictureBox.Size = new System.Drawing.Size(64, 65); this.rockPictureBox.TabIndex = 3; this.rockPictureBox.TabStop = false; this.rockPictureBox.Click += new System.EventHandler(this.rockPictureBox_Click); // // computerPictureBox4 // this.computerPictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("computerPictureBox4.Image"))); this.computerPictureBox4.Location = new System.Drawing.Point(186, 166); this.computerPictureBox4.Name = "computerPictureBox4"; this.computerPictureBox4.Size = new System.Drawing.Size(64, 65); this.computerPictureBox4.TabIndex = 4; this.computerPictureBox4.TabStop = false; this.computerPictureBox4.Visible = false; // // computerPictureBox3
  • 14. // this.computerPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("computerPictureBox3.Image"))); this.computerPictureBox3.Location = new System.Drawing.Point(186, 166); this.computerPictureBox3.Name = "computerPictureBox3"; this.computerPictureBox3.Size = new System.Drawing.Size(64, 65); this.computerPictureBox3.TabIndex = 5; this.computerPictureBox3.TabStop = false; this.computerPictureBox3.Visible = false; // // computerPictureBox2 // this.computerPictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("computerPictureBox2.Image"))); this.computerPictureBox2.Location = new System.Drawing.Point(186, 166); this.computerPictureBox2.Name = "computerPictureBox2"; this.computerPictureBox2.Size = new System.Drawing.Size(64, 65); this.computerPictureBox2.TabIndex = 6; this.computerPictureBox2.TabStop = false; this.computerPictureBox2.Visible = false; // // computerPictureBox1 // this.computerPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("computerPictureBox1.Image"))); this.computerPictureBox1.Location = new System.Drawing.Point(186, 166); this.computerPictureBox1.Name = "computerPictureBox1"; this.computerPictureBox1.Size = new System.Drawing.Size(64, 65); this.computerPictureBox1.TabIndex = 7; this.computerPictureBox1.TabStop = false; // // playerPictureBox4 // this.playerPictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("playerPictureBox4.Image"))); this.playerPictureBox4.Location = new System.Drawing.Point(347, 166);
  • 15. this.playerPictureBox4.Name = "playerPictureBox4"; this.playerPictureBox4.Size = new System.Drawing.Size(64, 65); this.playerPictureBox4.TabIndex = 8; this.playerPictureBox4.TabStop = false; this.playerPictureBox4.Visible = false; // // playerPictureBox3 // this.playerPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("playerPictureBox3.Image"))); this.playerPictureBox3.Location = new System.Drawing.Point(347, 166); this.playerPictureBox3.Name = "playerPictureBox3"; this.playerPictureBox3.Size = new System.Drawing.Size(64, 65); this.playerPictureBox3.TabIndex = 9; this.playerPictureBox3.TabStop = false; this.playerPictureBox3.Visible = false; // // playerPictureBox2 // this.playerPictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("playerPictureBox2.Image"))); this.playerPictureBox2.Location = new System.Drawing.Point(347, 166); this.playerPictureBox2.Name = "playerPictureBox2"; this.playerPictureBox2.Size = new System.Drawing.Size(64, 65); this.playerPictureBox2.TabIndex = 10; this.playerPictureBox2.TabStop = false; this.playerPictureBox2.Visible = false; // // playerPictureBox1 // this.playerPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("playerPictureBox1.Image"))); this.playerPictureBox1.Location = new System.Drawing.Point(347, 166); this.playerPictureBox1.Name = "playerPictureBox1"; this.playerPictureBox1.Size = new System.Drawing.Size(64, 65); this.playerPictureBox1.TabIndex = 11;
  • 16. this.playerPictureBox1.TabStop = false; // // exitButton // this.exitButton.Location = new System.Drawing.Point(266, 372); this.exitButton.Name = "exitButton"; this.exitButton.Size = new System.Drawing.Size(75, 23); this.exitButton.TabIndex = 12; this.exitButton.Text = "Exit"; this.exitButton.UseVisualStyleBackColor = true; this.exitButton.Click += new System.EventHandler(this.exitButton_Click); // // introTextLabel // this.introTextLabel.AutoSize = true; this.introTextLabel.Location = new System.Drawing.Point(164, 12); this.introTextLabel.Name = "introTextLabel"; this.introTextLabel.Size = new System.Drawing.Size(286, 52); this.introTextLabel.TabIndex = 13; this.introTextLabel.Text = "To begin play, make the first move by choosing a selection. To make an selection" + ", click on an image below. To quit, select Exit below. "; // // computerTextLabel // this.computerTextLabel.AutoSize = true; this.computerTextLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.computerTextLabel.Location = new System.Drawing.Point(116, 234); this.computerTextLabel.Name = "computerTextLabel"; this.computerTextLabel.Size = new System.Drawing.Size(0, 16); this.computerTextLabel.TabIndex = 14; this.computerTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // playerTextLabel //
  • 17. this.playerTextLabel.AutoSize = true; this.playerTextLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.playerTextLabel.Location = new System.Drawing.Point(312, 234); this.playerTextLabel.Name = "playerTextLabel"; this.playerTextLabel.Size = new System.Drawing.Size(0, 16); this.playerTextLabel.TabIndex = 15; this.playerTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // winnerTextLabel // this.winnerTextLabel.AutoSize = true; this.winnerTextLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.winnerTextLabel.Location = new System.Drawing.Point(10, 310); this.winnerTextLabel.Name = "winnerTextLabel"; this.winnerTextLabel.Size = new System.Drawing.Size(0, 24); this.winnerTextLabel.TabIndex = 16; this.winnerTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(614, 418); this.Controls.Add(this.winnerTextLabel); this.Controls.Add(this.playerTextLabel); this.Controls.Add(this.computerTextLabel); this.Controls.Add(this.introTextLabel); this.Controls.Add(this.exitButton); this.Controls.Add(this.playerPictureBox1); this.Controls.Add(this.playerPictureBox2); this.Controls.Add(this.playerPictureBox3); this.Controls.Add(this.playerPictureBox4); this.Controls.Add(this.computerPictureBox1); this.Controls.Add(this.computerPictureBox2);
  • 18. this.Controls.Add(this.computerPictureBox3); this.Controls.Add(this.computerPictureBox4); this.Controls.Add(this.rockPictureBox); this.Controls.Add(this.paperPictureBox); this.Controls.Add(this.scissorsPictureBox); this.Controls.Add(this.choosePictureBox); this.Name = "Form1"; this.Text = "Rocks Paper Scissors"; ((System.ComponentModel.ISupportInitialize)(this.choosePictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.scissorsPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.paperPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rockPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.computerPictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.playerPictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.PictureBox choosePictureBox; private System.Windows.Forms.PictureBox scissorsPictureBox; private System.Windows.Forms.PictureBox paperPictureBox; private System.Windows.Forms.PictureBox rockPictureBox; private System.Windows.Forms.PictureBox computerPictureBox4; private System.Windows.Forms.PictureBox computerPictureBox3; private System.Windows.Forms.PictureBox computerPictureBox2; private System.Windows.Forms.PictureBox computerPictureBox1; private System.Windows.Forms.PictureBox playerPictureBox4; private System.Windows.Forms.PictureBox playerPictureBox3; private System.Windows.Forms.PictureBox playerPictureBox2; private System.Windows.Forms.PictureBox playerPictureBox1;
  • 19. private System.Windows.Forms.Button exitButton; private System.Windows.Forms.Label introTextLabel; private System.Windows.Forms.Label computerTextLabel; private System.Windows.Forms.Label playerTextLabel; private System.Windows.Forms.Label winnerTextLabel; } } --------------------------------------program using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace xyz { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }