“Casino”
Tujuan
Tujuan pembuatan program aplikasi casino ini adalah untuk memenuhi penugasan modul 3 yang diberikan oleh asisten Desision Suport System selain itu juga bertujuan untuk menghibur atau penghilang stress bagi para user dan menantang para user untuk dapat memenangkan sebuah permainan slot ini.
Sasaran
Sasaran dari pembuatan program aplikasi casino ini adalah semua usia baik anak-anak, remaja, maupun orang dewasa karena tujuan dari permainan ini untuk menghibur atkau untuk melepas penat dari segala kesibukan aktivitas.
Deskrips
Program Aplikasi Casino ini terdiri dari 2 permainan yaitu secara classic maupun modern. Casino classic merupakan permainan slot angka dimana para user harus memasukan modal yang akan Ia pilih selain itu para user juga harus memasukkan bet sebagai bahan taruhannya. Untuk memulai permainan para user harus menekan tombol start dan angka akan berputar, untuk menghentikan angka tersebut user harus menekan tombol stop. Apabila saat user menekan tombol stop terdapat 2 angka kembar maka user akan mendapatkan tambahan uang dari bet yang Ia pasang di awal permainan, tetapi bila tidak terdapat 2 angka kembar maka user akan kehilangan modalnya sebesar bet yang Ia pasang. Hal ini juga terjadi dengan casino modern dimana casino modern ini berupa gambar.
TUTORIAL PEMBUATAN PROGRAM :
1. Membuka Aplikasi Visual Basic 2010
2. Pilih Windows Forms Application
3.Klik ok maka akan mucul tampilan seperti berikut
.4. Menampilkan toolbox yang digunakan
5. Buatlah tampilan program aplikasi seperti dibawah ini
(design dapat disesuaikan dengan selera anda )
6. Masukkan listing sebagai berikut
untuk Form 1 :
Public Class Form1
Dim mulai As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "" Then
MsgBox("PILIH MODAL ANDA TERLEBIH DAHULU !!!!!", MsgBoxStyle.Critical, "!!!!!!PERINGATAN !!!!!")
ElseIf Int(Label2.Text) <= 499 Then
MsgBox("MAAF UANG ANDA HABIS, ANDA TIDAK DAPAT BERMAIN LAGI, TOLONG ULANG PERMAINAN ANDA", MsgBoxStyle.Information, "INFORMASI ")
ElseIf Label7.Text = 0 Then
MsgBox("TOLONG PILIH BET ANDA TERLEBIH DULU !!!", MsgBoxStyle.Critical, "PERINGATAN !!!!!")
ElseIf Int(Label7.Text) > Int(Label2.Text) Then
MsgBox("BET anda terlalu besar, tolong pilih bet yang lebih kecil !!!!! ", MsgBoxStyle.Critical, "PERINGATAN")
ComboBox2.Visible = True
Else
Timer1.Enabled = True
Label3.Text = CStr(Int(Rnd() * 8))
Label4.Text = CStr(Int(Rnd() * 8))
Label5.Text = CStr(Int(Rnd() * 8))
Button1.Visible = False
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
If Button1.Visible = True Then
MsgBox("TOLONG SPIN TERLEBIH DULU")
ElseIf Label3.Text = Label4.Text Or Label3.Text = Label5.Text Or Label4.Text = Label3.Text Or Label4.Text = Label5.Text Or Label5.Text = Label3.Text Or Label5.Text = Label4.Text Then
Label2.Text = Int(Label2.Text) + Int(Label7.Text)
MsgBox("selamat anda benar")
Button1.Visible = True
ElseIf Label3.Text = 7 And Label4.Text = 7 And Label5.Text = 7 Then
Label2.Text = Int(Label2.Text) + (Int(Label7.Text) * 2)
Button1.Visible = True
Else
Label2.Text = Int(Label2.Text) - Int(Label7.Text)
MsgBox("anda kurang beruntung")
Button1.Visible = True
End If
If Label2.Text = 0 Then
MsgBox("permainan anda berakhir")
Button1.Visible = True
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label3.Text = CStr(Int(Rnd() * 8))
Label4.Text = CStr(Int(Rnd() * 8))
Label5.Text = CStr(Int(Rnd() * 8))
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
mainform.Show()
Me.Hide()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.CenterToScreen()
MsgBox("selamat bermain angka")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Label7.Text = 0
ComboBox2.Visible = True
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = 5000 Then
Label2.Text = 5000
ComboBox1.Visible = False
ElseIf ComboBox1.Text = 10000 Then
Label2.Text = 10000
ComboBox1.Visible = False
ElseIf ComboBox1.Text = 20000 Then
Label2.Text = 20000
ComboBox1.Visible = False
ElseIf ComboBox1.Text = 30000 Then
Label2.Text = 30000
ComboBox1.Visible = False
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox2.Text = 500 Then
Label7.Text = ComboBox2.Text
ComboBox2.Visible = False
ElseIf ComboBox2.Text = 1000 Then
Label7.Text = ComboBox2.Text
ComboBox2.Visible = False
ElseIf ComboBox2.Text = 2000 Then
Label7.Text = ComboBox2.Text
ComboBox2.Visible = False
End If
End Sub
End Class
untuk Form 2 :
Public Class Form2
Dim m, n1, n2, n3 As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If PictureBox1.Visible = False And PictureBox2.Visible = False And PictureBox3.Visible = False Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
End If
If ComboBox1.Text = "" Then
MsgBox("PILIH MODAL ANDA TERLEBIH DAHULU !!!!!", MsgBoxStyle.Critical, "!!!!!!PERINGATAN !!!!!")
ElseIf Label7.Text = 0 Then
MsgBox("TOLONG PILIH BET ANDA TERLEBIH DULU !!!", MsgBoxStyle.Critical, "PERINGATAN !!!!!")
ElseIf Int(Label7.Text) > Int(Label1.Text) Then
MsgBox("BET anda terlalu besar, tolong pilih bet yang lebih kecil !!!!! ", MsgBoxStyle.Critical, "PERINGATAN")
ComboBox2.Visible = True
Else
Timer1.Enabled = True
Button1.Visible = False
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
If Button1.Visible = True Then
MsgBox("TOLONG SPIN TERLEBIH DULU")
ElseIf n1 = n2 Or n1 = n3 Or n2 = n3 Then
MessageBox.Show("Congratulation! you get the point")
Label1.Text = Int(Label1.Text) + Int(Label7.Text)
Button1.Visible = True
ElseIf n1 = 6 And n2 = 6 And n3 = 6 Then
MsgBox("congratulation !!!!!, you get the jackpot !!!!!!")
Label1.Text = Int(Label1.Text) + (Int(Label7.Text) * 2)
Button1.Visible = True
Else
MsgBox("sorry")
Label1.Text = Int(Label1.Text) - Int(Label7.Text)
Button1.Visible = True
End If
If Label1.Text = 0 Then
MsgBox("Sorry, you must try again.", 0, "Peringatan")
Label1.Text = "5"
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
mainform.Show()
Me.Close()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
m = m + 1
If m < 1000 Then
n1 = Int(1 + Rnd() * 7)
n2 = Int(1 + Rnd() * 7)
n3 = Int(1 + Rnd() * 7)
Select Case n1
Case 1
PictureBox1.Image = ImageList1.Images.Item(0)
Case 2
PictureBox1.Image = ImageList1.Images.Item(1)
Case 3
PictureBox1.Image = ImageList1.Images.Item(2)
Case 4
PictureBox1.Image = ImageList1.Images.Item(3)
Case 5
PictureBox1.Image = ImageList1.Images.Item(4)
Case 6
PictureBox1.Image = ImageList1.Images.Item(5)
Case 7
PictureBox1.Image = ImageList1.Images.Item(6)
End Select
Select Case n2
Case 1
PictureBox2.Image = ImageList1.Images.Item(0)
Case 2
PictureBox2.Image = ImageList1.Images.Item(1)
Case 3
PictureBox2.Image = ImageList1.Images.Item(2)
Case 4
PictureBox2.Image = ImageList1.Images.Item(3)
Case 5
PictureBox2.Image = ImageList1.Images.Item(4)
Case 6
PictureBox2.Image = ImageList1.Images.Item(5)
Case 7
PictureBox2.Image = ImageList1.Images.Item(6)
End Select
Select Case n3
Case 1
PictureBox3.Image = ImageList1.Images.Item(0)
Case 2
PictureBox3.Image = ImageList1.Images.Item(1)
Case 3
PictureBox3.Image = ImageList1.Images.Item(2)
Case 4
PictureBox3.Image = ImageList1.Images.Item(3)
Case 5
PictureBox3.Image = ImageList1.Images.Item(4)
Case 6
PictureBox3.Image = ImageList1.Images.Item(5)
Case 7
PictureBox3.Image = ImageList1.Images.Item(6)
End Select
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Timer1.Enabled = False
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
ComboBox1.Visible = True
ComboBox2.Visible = True
Label1.Text = 0
Label7.Text = 0
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.CenterToScreen()
MsgBox("SIAPKAN MENTAL DAN UANG ANDA")
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim LABEL2 = Label1
If ComboBox1.Text = 5000 Then
Label2.Text = 5000
ComboBox1.Visible = False
ElseIf ComboBox1.Text = 10000 Then
Label2.Text = 10000
ComboBox1.Visible = False
ElseIf ComboBox1.Text = 20000 Then
Label2.Text = 20000
ComboBox1.Visible = False
ElseIf ComboBox1.Text = 30000 Then
Label2.Text = 30000
ComboBox1.Visible = False
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox2.Text = 500 Then
Label7.Text = ComboBox2.Text
ComboBox2.Visible = False
ElseIf ComboBox2.Text = 1000 Then
Label7.Text = ComboBox2.Text
ComboBox2.Visible = False
ElseIf ComboBox2.Text = 2000 Then
Label7.Text = ComboBox2.Text
ComboBox2.Visible = False
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ComboBox2.Visible = True
Label7.Text = 0
End Sub
End Class
untuk Form main form :
Public Class mainform
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
Me.Hide()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
MessageBox.Show("THANK YOU FOR JOIN THE GAME")
Me.Close()
End Sub
Private Sub mainform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.CenterToScreen()
MsgBox("selamat datang di permainan ini, siapkan mental dan keberuntungan anda !!!")
End Sub
End Class
UNTUK MELIHAT PROGRAM BISA DI DOWNLOAD DISINI :
0 komentar:
Posting Komentar