Adblock breaks this site

more code

Discussion in 'Spam Forum' started by Xboxerdude, Jan 22, 2009.

  1. Xboxerdude

    Xboxerdude Member

    Joined:
    Jul 6, 2008
    Posts:
    41
    Referrals:
    0
    Sythe Gold:
    0
    more code

    Public Class mainForm
    Private Wins As Integer = 0
    Private Losses As Integer = 0
    Private Ties As Integer = 0
    Private Total As Integer = 0
    Private Perc As Double
    Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click
    ' close mainform
    Me.Close()

    End Sub

    Private Sub rockPictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rockPictureBox.Click
    Dim randomGenerator As New Random
    Dim computerChoice As Integer

    playerPictureBox.Image = rockPictureBox.Image

    computerChoice = randomGenerator.Next(1, 4)
    Select Case computerChoice
    Case 1
    computerPictureBox.Image = rockPictureBox.Image
    winnerLabel.Text = "Tie"
    Ties = Ties + 1
    total = total + 1
    Case 2
    computerPictureBox.Image = paperPictureBox.Image
    winnerLabel.Text = "Computer wins because paper covers rock."
    Losses = Losses + 1
    total = total + 1
    Case 3
    computerPictureBox.Image = scissorsPictureBox.Image
    winnerLabel.Text = "Player wins because rock breaks scissors."
    wins = wins + 1
    total = total + 1
    End Select

    winTextBox.Text = Wins
    LossTextBox.Text = Losses
    tieTextbox.Text = Ties
    TotalTextBox.Text = Total

    Perc = Wins / Total

    percentTextBox.Text = FormatPercent(Perc)

    End Sub

    Private Sub paperPictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles paperPictureBox.Click
    Dim randomGenerator As New Random
    Dim computerChoice As Integer

    playerPictureBox.Image = paperPictureBox.Image

    computerChoice = randomGenerator.Next(1, 4)
    Select Case computerChoice
    Case 1
    computerPictureBox.Image = paperPictureBox.Image
    winnerLabel.Text = "Tie"
    Ties = Ties + 1
    Total = Total + 1
    Case 2
    computerPictureBox.Image = rockPictureBox.Image
    winnerLabel.Text = "Player wins because paper covers rock."
    Wins = Wins + 1
    Total = Total + 1
    Case 3
    computerPictureBox.Image = scissorsPictureBox.Image
    winnerLabel.Text = "Computer wins because scissors cuts paper."
    Losses = Losses + 1
    Total = Total + 1
    End Select
    End Sub

    Private Sub scissorsPictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles scissorsPictureBox.Click
    Dim randomGenerator As New Random
    Dim computerChoice As Integer

    playerPictureBox.Image = scissorsPictureBox.Image

    computerChoice = randomGenerator.Next(1, 4)
    Select Case computerChoice
    Case 1
    computerPictureBox.Image = scissorsPictureBox.Image
    winnerLabel.Text = "Tie"
    Ties = Ties + 1
    Total = Total + 1
    Case 2
    computerPictureBox.Image = paperPictureBox.Image
    winnerLabel.Text = "Player wins because scissors cut paper."
    Wins = Wins + 1
    Total = Total + 1
    Case 3
    computerPictureBox.Image = rockPictureBox.Image
    winnerLabel.Text = "Computer wins because rock breaks scissors."
    Losses = Losses + 1
    Total = Total + 1
    End Select
    End Sub

    Private Sub resetButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles resetButton.Click
    winTextBox.Text = ""
    LossTextBox.Text = ""
    tieTextbox.Text = ""
    TotalTextBox.Text = ""
    percentTextBox.Text = ""
    End Sub
    End Class
     
  2. Dustein

    Dustein Guest

    Referrals:
    0
    more code

    Rock paper scissors?
     
  3. Xboxerdude

    Xboxerdude Member

    Joined:
    Jul 6, 2008
    Posts:
    41
    Referrals:
    0
    Sythe Gold:
    0
    more code

    exactly
     
  4. Dustein

    Dustein Guest

    Referrals:
    0
    more code

    I'm going to make one of those for mIRC. :D
     
  5. wtp

    wtp Grand Master
    Banned

    Joined:
    Nov 25, 2005
    Posts:
    2,455
    Referrals:
    2
    Sythe Gold:
    0
    more code

    Not understanding this programming makes me feel a little less intelligent and slightly angry while I assume someone who understood this would feel intelligent and exited.
     
< Did You Know........... | Owned >


 
 
Adblock breaks this site