SlideShare a Scribd company logo
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

Game dev 101 part 3
Game dev 101 part 3Game dev 101 part 3
Game dev 101 part 3
Christoffer Noring
 
ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting Interactivity
Gilbert Guerrero
 
Unity3 d devfest-2014
Unity3 d devfest-2014Unity3 d devfest-2014
Unity3 d devfest-2014
Vincenzo Favara
 
LCS35
LCS35LCS35
Fps tutorial 2
Fps tutorial 2Fps tutorial 2
Fps tutorial 2
unityshare
 
Flappy bird
Flappy birdFlappy bird
Flappy bird
SantiagoYepesSerna
 
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
udit652068
 
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
Laurence 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.pdf
arcotstarsports
 
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
croysierkathey
 
Y1 gd level_designworkflow
Y1 gd level_designworkflowY1 gd level_designworkflow
Y1 gd level_designworkflow
crisgalliano
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
cojocarujanosko
 
Interaksi obyek
Interaksi obyekInteraksi obyek
Interaksi obyek
Fajar 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
 
Windows Phone Launchers and Choosers
Windows Phone Launchers and ChoosersWindows 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
dandylion13
 
Cocos2dx 7.1-7.2
Cocos2dx 7.1-7.2Cocos2dx 7.1-7.2
Cocos2dx 7.1-7.2
Kyungryul KIM
 
Chapter ii(coding)
Chapter ii(coding)Chapter ii(coding)
Chapter ii(coding)
Chhom Karath
 
RandomGuessingGame
RandomGuessingGameRandomGuessingGame
RandomGuessingGame
Christopher Singleton
 
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
Laurence 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.pdf
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 
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
fasttracksunglass
 

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

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 

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()); } } }