more code

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

more code
  1. Unread #1 - Jan 22, 2009 at 3:32 PM
  2. Xboxerdude
    Joined:
    Jul 6, 2008
    Posts:
    41
    Referrals:
    0
    Sythe Gold:
    0

    Xboxerdude Member

    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
     
  3. Unread #2 - Jan 22, 2009 at 3:35 PM
  4. Dustein
    Referrals:
    0

    Dustein Guest

    more code

    Rock paper scissors?
     
  5. Unread #3 - Jan 23, 2009 at 2:58 PM
  6. Xboxerdude
    Joined:
    Jul 6, 2008
    Posts:
    41
    Referrals:
    0
    Sythe Gold:
    0

    Xboxerdude Member

    more code

    exactly
     
  7. Unread #4 - Jan 23, 2009 at 2:59 PM
  8. Dustein
    Referrals:
    0

    Dustein Guest

    more code

    I'm going to make one of those for mIRC. :D
     
  9. Unread #5 - Jan 23, 2009 at 5:22 PM
  10. wtp
    Joined:
    Nov 25, 2005
    Posts:
    2,455
    Referrals:
    2
    Sythe Gold:
    0

    wtp Grand Master
    Banned

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site