15. Shuffle Game - Tutorial VB 2010

Поделиться
HTML-код
  • Опубликовано: 10 ноя 2024

Комментарии • 144

  • @OpticalDTV
    @OpticalDTV 10 лет назад +2

    one of the best tutorial out there!

  • @tkar66
    @tkar66 12 лет назад

    What a music! very pleasing
    Nice tut

  • @kerbydoblas7449
    @kerbydoblas7449 7 лет назад

    Thank you for all info i finish my program now :) Im so thankful those people giving me information :)

  • @julieatian5143
    @julieatian5143 6 лет назад

    thank you very much for the person who made this code. it helps me a lot for my final project. really don't know what to do, if you didn't made this. thank you very very much

  • @ronakjhala7037
    @ronakjhala7037 4 года назад

    Thank you so much for this amazing video.
    It's a really easy tutorial and I didn't feel any difficulty/error while making it. 🙏

  • @Tonio2110
    @Tonio2110 12 лет назад

    This is so simple. I made this puzzle with the ability to move more than one button at once, just like the one in Windows Vista/7

  • @duodot
    @duodot 14 лет назад +1

    cool^^
    and i love the music you're usingin your vids:)

  • @armelt.carguerajr.4374
    @armelt.carguerajr.4374 9 лет назад +3

    When i Click na Button it didn't move to a black button.. help please . :/

  • @itsaji
    @itsaji  13 лет назад +1

    @MrBejta
    There is No straight function in VB to find Percentage.
    Try this :
    Dim Amt, P, R, T, I as Double
    P = val(Textbox1.Text)
    R = val(Textbox2.Text)
    T = val(Textbox3.Text)
    I = (P*R)/100 *T
    Amt = P + I
    Label1.Text = “Interest :” & I
    Label2.Text = “Total :” & Amt

  • @mcqueccu
    @mcqueccu 12 лет назад

    great...Love it love it love it

  • @akramestta
    @akramestta 14 лет назад

    man you are the best !
    but can you explain the code of the shuffle in the module cuz i don't understand it at all.
    please answer me see you !

  • @yevinsebastian8171
    @yevinsebastian8171 8 лет назад +1

    I try to do this in visual studio 2012, ¿why it doesn´t work?

  • @jeffreyelizaga5111
    @jeffreyelizaga5111 4 года назад

    Sir how about the looping in 3x3?

  • @sebastianvipond571
    @sebastianvipond571 8 лет назад

    How might I add pictures to move with the numbers? More like a picture puzzle game.

  • @EsAiEks
    @EsAiEks 11 лет назад

    hi Sir!. Thanks to this Vid!. It really helped me in my project in GameDev!. Super Thanks!. :)

  • @jyothinangunuri1679
    @jyothinangunuri1679 10 лет назад +2

    The numbers are not moving from one box to another box why

  • @fredykiller24
    @fredykiller24 12 лет назад

    me podrias decir el nombre de la cancion ? jejeje tocar guitarra es mi otra pasion aparte de programar :D buenisimo tuto por cierto va para mis favoritos!

  • @ISIS-ks8ir
    @ISIS-ks8ir 13 лет назад

    Great vid, really helpful

  • @YLVision
    @YLVision 11 лет назад

    Can u explain the shuffle subroutine

  • @deklp100
    @deklp100 10 лет назад +1

    can you tell me code button9 and button10

  • @zairamaeocampo4336
    @zairamaeocampo4336 8 лет назад

    good job ! i like it ☺

  • @itsaji
    @itsaji  13 лет назад

    @MrBejta
    Eg: 15 % on 1500 € for 2 year
    Formula for Simple Interest = Principal × Rate × Time
    P = 1500
    R = 15
    T = 2
    Interest = ((P * R)/100) *T
    Total = P + Interest

  • @rubisoto7125
    @rubisoto7125 12 лет назад

    muy buen video tutorial muy completo

  • @liormak5873
    @liormak5873 6 лет назад

    can u do this in 2008 version?

  • @rubenraj3387
    @rubenraj3387 10 лет назад +4

    Overall good and the video helpful fr me. I found u hd a mistake tat u declared wrong buttons for button number 5..

  • @SreenikethanI
    @SreenikethanI 7 лет назад

    Actually instead of creating separate Subs for each Button, you can just use the AddHandler statement at the startup of the Form. I mean like using a For loop to go through each Control in the Controls property of the form, then checking whether it's a Button, then using the AddHandler statement like this: AddHandler CurrentControl.Click ActionSub
    And ActionSub is a Sub with "sender As Object" and "e as EventArgs" as parameters.
    Then in the ActionSub, you can check the sender's surrounding... wait now that's a problem.
    Or use the TableLayoutPanel control. It's easier.

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      That's right, it would be better to just select all the buttons, go to the event section in properties, and click on the onclick event twice, and use a sender statement in a select case situation to check the buttons, like case button1.text, checkbutton 2, 5, etc.
      If you want to check the sender's surrounding, you have to know where the empty button (the button that does not contain the text) is, and you may need to use the empty button location, and check the clicked button location + the size of it, and if there are gaps between one button and the next, you need to add the gap number as well (not too sure if I am right or not), I don't know how to make the program work like this.

    • @shaunzhang733
      @shaunzhang733 4 года назад

      Now I know how to check the sender's surrounding, there's really no need to use a tablelayoutpanel at all for this.

  • @mumbai4862
    @mumbai4862 8 лет назад

    Good Job!

  • @carlsberxithub3711
    @carlsberxithub3711 11 лет назад

    hello sir i am using vb.net 2008 and i follow all your steps in the checkbutton module but it doesn't work....please help sir?

  • @Hardrockerzz15
    @Hardrockerzz15 12 лет назад

    wht song is this pls tell

  • @haveabestlife
    @haveabestlife 12 лет назад

    Hey! I Added The Shuffle Code But when i played it, the app was not visible at all and the mesagebox also dint worked!

  • @ABMultimediaDesigner
    @ABMultimediaDesigner 11 лет назад

    Can I use pictureboxes instead?

  • @deisybermudez8762
    @deisybermudez8762 10 лет назад

    Hola Itsaji, tengo un problema en la subrutina para mostrar los botones al azar, en la sentencia: RN = CInt(Int((15 * Rdn()) + 1)), no he logrado comprender dónde está declarado Rdn, ojalá pudieras ayudarme. Saludos.

  • @syedshahrukhali4392
    @syedshahrukhali4392 9 лет назад

    plz tell me why my some numbers are missing and some are repeated

  • @alfreddiomangay7596
    @alfreddiomangay7596 9 лет назад

    thank you for this tutorial.. i made it work.
    Question: how can i reset the click counts?

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      You only need to put Form1.count = 0 at the last line of the shuffle event.

    • @dr.richardtrager9323
      @dr.richardtrager9323 4 года назад

      Well if you do the counting with a label like me ... and a shuffle button then just type that into the shuffle button: Label1.text = "" Form1.count = 0

  • @kerbydoblas7449
    @kerbydoblas7449 7 лет назад

    all button are working except button 9 it didn't move to button 5 only but it's move to button 10 and 13 so plss help me.

  • @tkar66
    @tkar66 12 лет назад

    of course

  • @MikeObeyMe
    @MikeObeyMe 12 лет назад

    Does This Work on Vb 2008 profi.

  • @itsaji
    @itsaji  12 лет назад

    Gracias y buena suerte con su programación vb

  • @jayhilmes90
    @jayhilmes90 12 лет назад

    Can you plese tell me the code for 9,10,11 and 12.

  • @kerbydoblas7449
    @kerbydoblas7449 7 лет назад

    what code for button 9 ? its not working

  • @mfauzikushardian3153
    @mfauzikushardian3153 7 лет назад

    Thanks for your information sir,

  • @RitheaSen
    @RitheaSen 10 лет назад

    CAn you tell me code Button9 and Button10.

  • @timkelley2882
    @timkelley2882 10 лет назад

    Now when i create a new windows form is it C#

  • @sateshsukram5550
    @sateshsukram5550 10 лет назад

    Hey I made the game, but when I click the play button it says "There were build errors. Would you like to continue and run the last successful build?" ...Can anyone help me with that??

  • @musiclover-xy8ii
    @musiclover-xy8ii 5 лет назад

    Thank you

  • @shyampatel5736
    @shyampatel5736 10 лет назад

    Hey... Can u send me a code i can't understand in button 9,10,11 and 12 plz

  • @bahadorvafadar6691
    @bahadorvafadar6691 10 лет назад

    What is the name of the song? :)

  • @kaustubh21
    @kaustubh21 5 лет назад

    BGM = Peace.........!

  • @apirak
    @apirak 8 лет назад

    THX so much : )

  • @DerKaptain1
    @DerKaptain1 14 лет назад

    goot tut, but can you tell me the musik name of this video ??!!
    MFG DerKaptain1

  • @aljohnteodoro2353
    @aljohnteodoro2353 12 лет назад

    HEY! MINE WAS NOT COUNTING ITS CLICKS AND THE SHUFFLE's NOT WORKING.

  • @kuwentokatotohanankasaysay7554
    @kuwentokatotohanankasaysay7554 8 лет назад

    Thanks Bro! :)

  • @itsaji
    @itsaji  14 лет назад

    @TheEpicNewb
    Thanks ..!

  • @julieatian5143
    @julieatian5143 6 лет назад

    9 and 16?

  • @debesteniels
    @debesteniels 10 лет назад

    if i shuffle the buttons the score doesn't reset
    what do i have to do to reset the clicks i made?

  • @thinaneshan2009
    @thinaneshan2009 8 лет назад

    Can you please tell me the codes of button 9 and 10....

  • @timeoriginal9688
    @timeoriginal9688 8 лет назад

    This program is a little bit flowchart request

  • @lubomyrstefanov8779
    @lubomyrstefanov8779 10 лет назад

    How to make it restart the counting in the top left when you click shuffle... i mean it still counts from before you shuffle

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      Put count = 0 at the end of the shuffle event

  • @aljohnteodoro2353
    @aljohnteodoro2353 12 лет назад

    Me too! When I started to debug it, the app was not visible.

  • @mamayguimovlog3223
    @mamayguimovlog3223 8 лет назад

    good day.. can you help me with my problem about the coding? i'm having a multiple number in my number box.. what could be the problem?

    • @shaunzhang733
      @shaunzhang733 4 года назад

      Look at the code I posted, you need to make sure flag = true and flag = false are in the correct place, and you should see no repeats..
      Besides, here is another way to random, and this should work (you need to use at least VB 2017 or else it may not work)
      Dim Random as New Random
      Dim Numbers = Enumerable.Range(1, 15).ToList
      For I = 1 to 15
      If Numbers.Count = 0 Then Exit For
      Dim index = Random.Next(Numbers.Count)
      Controls("Button" & i).Text = Numbers(index)
      Numbers.RemoveAt(index)
      Next
      Button16.text = ""

  • @valentinoriva5566
    @valentinoriva5566 3 года назад

    bro can yuo give the code plz?:)

  • @michaelangelo4176
    @michaelangelo4176 7 лет назад

    Thanks!!!

  • @jackbrewlabel1003
    @jackbrewlabel1003 8 лет назад

    Fuckin' thanks U homie
    U damn it save me

  • @sateshsukram5550
    @sateshsukram5550 10 лет назад

    It's not letting me play the game

  • @bonulti
    @bonulti 11 лет назад

    source code?

  • @charlenezaide
    @charlenezaide 10 лет назад

    thank you sir :)

  • @TiagoDaniel13
    @TiagoDaniel13 11 лет назад

    Thanks :D

  • @arturodavilabravo1391
    @arturodavilabravo1391 11 лет назад

    muy bueno-

  • @jesseosarobo
    @jesseosarobo 10 лет назад

    Hello can you email me the codes pls? it's not very clear on here

  • @jayhilmes90
    @jayhilmes90 12 лет назад

    does anyone know the coding for 9,10,11 and 12

  • @achrefabidi8208
    @achrefabidi8208 10 лет назад

    hello! the code please

  • @kevnar
    @kevnar 9 лет назад

    Control arrays would have made this so much simpler.

    • @iamrichmirs
      @iamrichmirs 9 лет назад

      +kevnar hi, do u have tutorial like this? can u please teach me.. thanks

    • @kevnar
      @kevnar 9 лет назад

      Control arrays were a VB 6 thing. I don't think you can do them in VB.net. Not directly, anyway.

    • @iamrichmirs
      @iamrichmirs 9 лет назад

      ahh..ok, thanks for the info.

  • @lunden1339
    @lunden1339 11 лет назад

    Made some changes to this so count won't count if there's not an empty button next to it and it won't count if you're clicking on an empty box. added a reset to count in shuffle aswell. you can find the code for that here pastebin dot com/0sz7EThf

  • @petercook932
    @petercook932 8 лет назад +3

    Nice video but it would have been better had you either added comments to the code to explain what you were doing or added a voice track instead of music. The most critical point in the code was the shuffle and yet it was the part with the littlest amount of time on it. I had to stop the video and copy what you had done. See my code below
    Sub Shuffle()
    Dim a(15), i, j, RN As Integer
    Dim flag As Boolean
    flag = False
    i = 1
    a(j) = 1
    Do While i 14 Then Exit For 'exit here as we will have apiiled the text to buttons 0 to 14
    ctrl.Text = a(i)
    i += 1
    End If
    Next
    'set the bottom right button (16th Tile) to no text
    Form1.Button16.Text = ""
    End Sub
    I reset the Click counter at the bottom of the CheckSolved sub in the if statement that checked if the puzzle had been solved.

    • @mdcomputercenter2155
      @mdcomputercenter2155 6 лет назад

      thanks for the code

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      Just use this code under loop in the shuffle event, it will work (I've tested it).
      For I = 1 to 15
      controls("Button" & i).text = a(i)
      Next
      Button16.text = ""
      If the random code is done in a Module, use the following code instead (though it is similar to the previous one)
      Form1.controls("Button" & i).text = a(i)
      Next
      Form1.Button16.text = ""

  • @Asst_Lec_Yousif
    @Asst_Lec_Yousif 8 лет назад

    I need to code ples

  • @jay-rruiz945
    @jay-rruiz945 10 лет назад

    clicks doesn't count on me please help

  • @MegaDastaan
    @MegaDastaan 7 лет назад

    someone please post this project here

  • @onilvillegas936
    @onilvillegas936 11 лет назад

    it doesnt work on me . wen i click a number it doesnt move :(( pls help me

    • @dreanics_
      @dreanics_ 5 лет назад

      same

    • @shaunzhang733
      @shaunzhang733 4 года назад

      Please see my comment on this, I got all the codes there.

  • @kenzieradityatirtarahardja7469
    @kenzieradityatirtarahardja7469 8 лет назад

    i wont show up the msgbox

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      You may want to use a status strip to show that the game is completed, as well as the move count, maybe even the amount of time taken to play the game

  • @vshelper3419
    @vshelper3419 9 лет назад

    the buttons don't move

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      The buttons don't move, just the number moving into the button that has nothing when you click on a button that has a number and is adjacent to (next to) the button that has nothing

  • @shaunzhang733
    @shaunzhang733 4 года назад

    Further to my previous comment, the following code will make a message box appear when the user clicks shuffle after the game is already started.
    Private Sub tsShuffle_Click(sender As Object, e As EventArgs) Handles tsShuffle.Click
    If finished = True Then Shuffle()
    If start = False Then Shuffle()
    If start = True Then
    If vbYes = MsgBox("This puzzle is in progress." + Environment.NewLine + "Are you sure you want to shuffle?", MsgBoxStyle.YesNo, "Puzzle is in progress") Then
    Shuffle()
    Else
    End If
    End If
    End Sub

  • @polya1580
    @polya1580 4 года назад

    Можно код игры

  • @elta8553
    @elta8553 8 лет назад

    I created a web browser with visual basic 2010.

  • @itsaji
    @itsaji  14 лет назад

    @DerKaptain1
    I don't have any info on the music .. I picked it from some old .. random music files.

  • @Fieldy6654
    @Fieldy6654 12 лет назад

    awesome vid, but muted

  • @godhandgaming4480
    @godhandgaming4480 4 года назад

    where is source code

    • @godhandgaming4480
      @godhandgaming4480 4 года назад

      can you send me

    • @godhandgaming4480
      @godhandgaming4480 4 года назад

      and your awsome

    • @shaunzhang733
      @shaunzhang733 4 года назад

      @@godhandgaming4480 Just use my code. Sort by Newest first, and see my comment, all the codes are there.

    • @shaunzhang733
      @shaunzhang733 4 года назад

      @@godhandgaming4480 Actually I have two comments, which make the game more complete.

  • @antonyfuentes3496
    @antonyfuentes3496 6 лет назад

    a mi me interesa amigo

  • @mdcomputercenter2155
    @mdcomputercenter2155 6 лет назад

    haha manage to do thay in visual basic 6.0, it is much easier

  • @kerbydoblas7449
    @kerbydoblas7449 7 лет назад

    somebody else who can help me plsss, help me

  • @tempereddust
    @tempereddust 7 лет назад

    This code creates Insolvable shuffle from time to time. Needs a better shuffle code

    • @maleplatypus
      @maleplatypus 6 лет назад

      agreed would be useful to not have unsolvable puzzles

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      No shuffle games are unsolvable, it is just the way you solve it can make it harder to solve in the end.
      The point is to get the number 1 to 8 first, then get 9 and 13 into the right place, and then get 10 and 14 into the right place, and the rest should be quite straightforward. Also, it would be a good idea to put the number you are going to move behind the number that is 1 number greater than it, for example, if you want to solve 3, put 4 on top, 3 on the bottom of 4, this way, when you move 4 into the place where 3 is supposed to be, and then move 4 to the right, then you will be able to insert 3 into where it is supposed to be.
      I once found that shuffle game was not easy to solve, but it turns out to be very easy as soon as I watched videos on how to solve slider puzzles.
      You may want to check out how to solve number shuffle puzzle game on youtube for more details.

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      The above solution may sometimes cause you to stuck, but you could try and figure out a fix for that. Again, search for guides on how to solve number shuffle puzzle game for solutions.

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      After investigating this further, I found that there are indeed unsolvable puzzles in this case, maybe there need to be a code to deal with the parity issues.

    • @shaunzhang733
      @shaunzhang733 5 лет назад

      While I don't have any way to make the game always solvable every time it resets, there is a way around it.
      When the movecount (or clicks) reaches a certain number there will be a message box warning you saying that the game may not be solvable, and ask you if you want to reset the game or not.
      In the checkbutton subroutine, under movecount += 1, or click +=1 (depends on what you use), put this code in.
      If movecount = 200 or movecount = 250 then
      if vbyes = msgbox("There is a chance that this puzzle is unsolvable, do you want to reset the puzzle?", vbYesNo, "Possibly Unsolvable") then
      shuffle()
      Else
      End if
      End if

  • @relliennegauran2528
    @relliennegauran2528 7 лет назад

    there's a error in my program, it says that "HAndles Clause requires a WithEvents variable defined in the containing type or one of its base types
    Help me Please!

  • @502ricardo
    @502ricardo 11 лет назад

    Tell me what makes each of these things?
    Dim a(15), i, j, RN As Integer
    Dim Flag As Boolean
    Flag = False
    i = 1
    a(j) = 1
    Do While i

    • @shaunzhang733
      @shaunzhang733 4 года назад

      This is simply a code that prevent random numbers from repeating.
      Do while I

  • @petercook932
    @petercook932 8 лет назад

    Further to my comment below I found a bug in my code below is the revised code
    Dim a(15), i, j, RN As Integer
    Dim flag As Boolean
    flag = False
    i = 0
    a(j) = 0
    Do While i

    • @Dripz_Kdot
      @Dripz_Kdot 8 лет назад

      +Peter Cook You should do another tutorial.. I'm actually doing this as a project so I kinda need help on certain things

    • @SoundASculptorI
      @SoundASculptorI 8 лет назад

      failure

  • @SahanMendis
    @SahanMendis 11 лет назад

    Same here :(

  • @Sumrandomdouchebag1
    @Sumrandomdouchebag1 8 лет назад

    basic is one ulgy language

  • @bahez11
    @bahez11 10 лет назад

    good tutrial but bad video and ex planes

    • @vshelper3419
      @vshelper3419 9 лет назад

      bahez hawlery Baad spealing two

    • @danykl9030
      @danykl9030 9 лет назад

      +VSHelper & +bahez hawlery you both have bad spelling

    • @bahez11
      @bahez11 9 лет назад

      u r right:d
      i dont even remember when i commented on this video

  • @k00mikhacking-gaming81
    @k00mikhacking-gaming81 9 лет назад

    don't work ! :D