VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is a buy/makebacon pig game (pretty simple but fun).

by Harn (8 Submissions)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 14th November 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is a buy/makebacon pig game (pretty simple but fun).

Rate This is a buy/makebacon pig game (pretty simple but fun).



Dim cash As Double

Private Sub Command1_Click()
pigs = pigs + 1
Text2.Text = pigs
cash = cash - 25
Text1.Text = cash
If pigs = 5 Then
    MsgBox "pig riot"
    MsgBox "You lose!"
    End
End If
If cash < 0 Then
MsgBox "You are in debt"
MsgBox "You lose"
End
End If
If Int(pigs * cash) Mod 4 = 0 Then
    pigs = pigs + 3
End If
End Sub

Private Sub Command2_Click()
pigs = pigs - 1
Text2.Text = pigs
cash = cash + 30
Text1.Text = cash
If pigs = -1 Then
MsgBox "Goat invasion"
MsgBox "You have $" & cash
MsgBox "To win my game you must get $10000"
End If

If cash >= 10000 Then
    MsgBox "You win my game!"
    MsgBox "You have mad skills!"
    End
End If




End Sub

Private Sub Form_Load()
    pigs = 3
    cash = 100
End Sub



Download this snippet    Add to My Saved Code

This is a buy/makebacon pig game (pretty simple but fun). Comments

No comments have been posted about This is a buy/makebacon pig game (pretty simple but fun).. Why not be the first to post a comment about This is a buy/makebacon pig game (pretty simple but fun)..

Post your comment

Subject:
Message:
0/1000 characters