Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Puzzle Game - Visual Studio 2010 filter_list
Author
Message
Puzzle Game - Visual Studio 2010 #1
I sat back in the Computer Lab and Opened up Java Netbean, I started making this game(Small Puzzle), the next day(After my class, I continued it!). So it took me around 4 -5 Hours in total. Then, I wrote the program in VB.Net, C#, C++, etc, after that java language. So I want to share the first version (so far I have not started the second version yet) with you. So Play and Enjoy it!


[Image: 11-300x280.png]



PHP Code:
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
  
If (Button12.Text ""Then
    Dim swap 
As String
    swap 
Button11.Text
    Button11
.Text ""
    
Button12.Text swap
    Label1
.Text = (Label1.Text) + 1
  
ElseIf (Button10.Text ""Then
    Dim swap 
As String
    swap 
Button11.Text
    Button11
.Text ""
    
Button10.Text swap
    Label1
.Text = (Label1.Text) + 1
  
ElseIf (Button7.Text ""Then
    Dim swap 
As String
    swap 
Button11.Text
    Button11
.Text ""
    
Button7.Text swap
    Label1
.Text = (Label1.Text) + 1
  End 
If
  If (
Button2.Text "1" And Button3.Text "2" And Button4.Text "3" And Button5.Text "4" And Button6.Text "5" And Button7.Text "6" And Button8.Text "7" And Button9.Text "8" And Button10.Text "9" And Button11.Text "10" And Button12.Text "11" And Button13.Text ""Then
    MsgBox
("Congratulation! You have won the game."0"CONGRATULATION")
  
End If
    
End Sub

Private Sub Button15_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button15.ClickMe.Load
  Label1
.Text "0"
  
Try
    
Dim str() As String = {"1""2""3""4""5""6""7""8""9""10""11"""}
    
ShuffleArray(str)
    
Button2.Text str(0)
    
Button3.Text str(1)
    
Button4.Text str(2)
    
Button5.Text str(3)
    
Button6.Text str(4)
    
Button7.Text str(5)
    
Button8.Text str(6)
    
Button9.Text str(7)
    
Button10.Text str(8)
    
Button11.Text str(9)
    
Button12.Text str(10)
    
Button13.Text str(11)
  Catch 
ex As Exception

  End 
Try
    
End Sub
    
Public Shared Sub ShuffleArray(ByRef Array() As String)
  
Dim Rand As Random = New Random()
  For 
As Integer 0 To Array.Length 1
    Dim TempIndex 
As Integer Rand.Next(Array.Length)
    
Dim TempValue As String = Array(TempIndex)
    Array(
TempIndex) = Array(x)
    Array(
x) = TempValue
  Next
    End Sub 
[Image: coolsignature.gif]
:angel:

Reply

RE: Puzzle Game - Visual Studio 2010 #2
A basic game, but good job.

Reply







Users browsing this thread: 1 Guest(s)