15. Shuffle Game - Tutorial VB 2010

  Рет қаралды 145,732

itsaji

itsaji

Күн бұрын

Пікірлер: 144
@OpticalDTV
@OpticalDTV 10 жыл бұрын
one of the best tutorial out there!
@tkar66
@tkar66 12 жыл бұрын
What a music! very pleasing Nice tut
@itsaji
@itsaji 14 жыл бұрын
@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
@duodot
@duodot 14 жыл бұрын
cool^^ and i love the music you're usingin your vids:)
@julieatian5143
@julieatian5143 7 жыл бұрын
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
@itsaji
@itsaji 14 жыл бұрын
@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
@armelt.carguerajr.4374
@armelt.carguerajr.4374 9 жыл бұрын
When i Click na Button it didn't move to a black button.. help please . :/
@kerbydoblas7449
@kerbydoblas7449 8 жыл бұрын
Thank you for all info i finish my program now :) Im so thankful those people giving me information :)
@EsAiEks
@EsAiEks 12 жыл бұрын
hi Sir!. Thanks to this Vid!. It really helped me in my project in GameDev!. Super Thanks!. :)
@yevinsebastian8171
@yevinsebastian8171 8 жыл бұрын
I try to do this in visual studio 2012, ¿why it doesn´t work?
@jyothinangunuri1679
@jyothinangunuri1679 10 жыл бұрын
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!
@sebastianvipond571
@sebastianvipond571 8 жыл бұрын
How might I add pictures to move with the numbers? More like a picture puzzle game.
@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
@jeffreyelizaga5111
@jeffreyelizaga5111 4 жыл бұрын
Sir how about the looping in 3x3?
@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 !
@rubenraj3387
@rubenraj3387 10 жыл бұрын
Overall good and the video helpful fr me. I found u hd a mistake tat u declared wrong buttons for button number 5..
@havocshasvsveena6731
@havocshasvsveena6731 10 жыл бұрын
Hi
@YLVision
@YLVision 11 жыл бұрын
Can u explain the shuffle subroutine
@mcqueccu
@mcqueccu 13 жыл бұрын
great...Love it love it love it
@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!
@deisybermudez8762
@deisybermudez8762 11 жыл бұрын
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.
@zairamaeocampo4336
@zairamaeocampo4336 8 жыл бұрын
good job ! i like it ☺
@kerbydoblas7449
@kerbydoblas7449 8 жыл бұрын
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.
@liormak5873
@liormak5873 6 жыл бұрын
can u do this in 2008 version?
@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?
@MikeObeyMe
@MikeObeyMe 12 жыл бұрын
Does This Work on Vb 2008 profi.
@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 6 жыл бұрын
Put count = 0 at the end of the shuffle event
@SreenikethanI
@SreenikethanI 8 жыл бұрын
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 6 жыл бұрын
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 5 жыл бұрын
Now I know how to check the sender's surrounding, there's really no need to use a tablelayoutpanel at all for this.
@syedshahrukhali4392
@syedshahrukhali4392 9 жыл бұрын
plz tell me why my some numbers are missing and some are repeated
@deklp100
@deklp100 10 жыл бұрын
can you tell me code button9 and button10
@ISIS-ks8ir
@ISIS-ks8ir 13 жыл бұрын
Great vid, really helpful
@debesteniels
@debesteniels 11 жыл бұрын
if i shuffle the buttons the score doesn't reset what do i have to do to reset the clicks i made?
@shaunzhang733
@shaunzhang733 6 жыл бұрын
Put click = 0 at the end of the sub shuffle event, just before end sub
@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??
@alfreddiomangay7596
@alfreddiomangay7596 9 жыл бұрын
thank you for this tutorial.. i made it work. Question: how can i reset the click counts?
@shaunzhang733
@shaunzhang733 6 жыл бұрын
You only need to put Form1.count = 0 at the last line of the shuffle event.
@dr.richardtrager9323
@dr.richardtrager9323 5 жыл бұрын
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
@ronakjhala7037
@ronakjhala7037 5 жыл бұрын
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. 🙏
@ABMultimediaDesigner
@ABMultimediaDesigner 12 жыл бұрын
Can I use pictureboxes instead?
@mamayguimovlog3223
@mamayguimovlog3223 9 жыл бұрын
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 5 жыл бұрын
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 = ""
@timkelley2882
@timkelley2882 10 жыл бұрын
Now when i create a new windows form is it C#
@kerbydoblas7449
@kerbydoblas7449 8 жыл бұрын
what code for button 9 ? its not working
@Hardrockerzz15
@Hardrockerzz15 12 жыл бұрын
wht song is this pls tell
@timeoriginal9688
@timeoriginal9688 9 жыл бұрын
This program is a little bit flowchart request
@jayhilmes90
@jayhilmes90 12 жыл бұрын
Can you plese tell me the code for 9,10,11 and 12.
@shyampatel5736
@shyampatel5736 11 жыл бұрын
Hey... Can u send me a code i can't understand in button 9,10,11 and 12 plz
@rubisoto7125
@rubisoto7125 12 жыл бұрын
muy buen video tutorial muy completo
@thinaneshan2009
@thinaneshan2009 9 жыл бұрын
Can you please tell me the codes of button 9 and 10....
@tesfahungunta2733
@tesfahungunta2733 8 жыл бұрын
Gyhhu
@RitheaSen
@RitheaSen 11 жыл бұрын
CAn you tell me code Button9 and Button10.
@bahadorvafadar6691
@bahadorvafadar6691 11 жыл бұрын
What is the name of the song? :)
@aljohnteodoro2353
@aljohnteodoro2353 12 жыл бұрын
Me too! When I started to debug it, the app was not visible.
@lunden1339
@lunden1339 12 жыл бұрын
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
@itsaji
@itsaji 12 жыл бұрын
Gracias y buena suerte con su programación vb
@mfauzikushardian3153
@mfauzikushardian3153 7 жыл бұрын
Thanks for your information sir,
@itsaji
@itsaji 14 жыл бұрын
@TheEpicNewb Thanks ..!
@aljohnteodoro2353
@aljohnteodoro2353 12 жыл бұрын
HEY! MINE WAS NOT COUNTING ITS CLICKS AND THE SHUFFLE's NOT WORKING.
@DerKaptain1
@DerKaptain1 14 жыл бұрын
goot tut, but can you tell me the musik name of this video ??!! MFG DerKaptain1
@kuwentokatotohanankasaysay7554
@kuwentokatotohanankasaysay7554 8 жыл бұрын
Thanks Bro! :)
@mumbai4862
@mumbai4862 8 жыл бұрын
Good Job!
@julieatian5143
@julieatian5143 7 жыл бұрын
9 and 16?
@jackbrewlabel1003
@jackbrewlabel1003 8 жыл бұрын
Fuckin' thanks U homie U damn it save me
@tkar66
@tkar66 12 жыл бұрын
of course
@musiclover-xy8ii
@musiclover-xy8ii 5 жыл бұрын
Thank you
@Tigerblackshirt
@Tigerblackshirt 9 жыл бұрын
THX so much : )
@sateshsukram5550
@sateshsukram5550 10 жыл бұрын
It's not letting me play the game
@petercook932
@petercook932 9 жыл бұрын
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 = ""
@kevnar
@kevnar 10 жыл бұрын
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.
@jayhilmes90
@jayhilmes90 12 жыл бұрын
does anyone know the coding for 9,10,11 and 12
@valentinoriva5566
@valentinoriva5566 4 жыл бұрын
bro can yuo give the code plz?:)
@kaustubh21
@kaustubh21 5 жыл бұрын
BGM = Peace.........!
@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 5 жыл бұрын
Please see my comment on this, I got all the codes there.
@itsaji
@itsaji 14 жыл бұрын
@DerKaptain1 I don't have any info on the music .. I picked it from some old .. random music files.
@charlenezaide
@charlenezaide 10 жыл бұрын
thank you sir :)
@jesseosarobo
@jesseosarobo 11 жыл бұрын
Hello can you email me the codes pls? it's not very clear on here
@vshelper3419
@vshelper3419 9 жыл бұрын
the buttons don't move
@shaunzhang733
@shaunzhang733 6 жыл бұрын
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
@jay-rruiz945
@jay-rruiz945 11 жыл бұрын
clicks doesn't count on me please help
@jay-rruiz945
@jay-rruiz945 11 жыл бұрын
oh! nvm.. :)
@bonulti
@bonulti 11 жыл бұрын
source code?
@michaelangelo4176
@michaelangelo4176 7 жыл бұрын
Thanks!!!
@MegaDastaan
@MegaDastaan 7 жыл бұрын
someone please post this project here
@shaunzhang733
@shaunzhang733 5 жыл бұрын
Please see my comment.
@achrefabidi8208
@achrefabidi8208 11 жыл бұрын
hello! the code please
@TiagoDaniel13
@TiagoDaniel13 11 жыл бұрын
Thanks :D
@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
@elta8553
@elta8553 8 жыл бұрын
I created a web browser with visual basic 2010.
@kenzieradityatirtarahardja7469
@kenzieradityatirtarahardja7469 8 жыл бұрын
how
@Asst_Lec_Yousif
@Asst_Lec_Yousif 9 жыл бұрын
I need to code ples
@arturodavilabravo1391
@arturodavilabravo1391 12 жыл бұрын
muy bueno-
@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!
@antonyfuentes3496
@antonyfuentes3496 6 жыл бұрын
a mi me interesa amigo
@shaunzhang733
@shaunzhang733 5 жыл бұрын
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
@godhandgaming4480
@godhandgaming4480 5 жыл бұрын
where is source code
@godhandgaming4480
@godhandgaming4480 5 жыл бұрын
can you send me
@godhandgaming4480
@godhandgaming4480 5 жыл бұрын
and your awsome
@shaunzhang733
@shaunzhang733 5 жыл бұрын
@@godhandgaming4480 Just use my code. Sort by Newest first, and see my comment, all the codes are there.
@shaunzhang733
@shaunzhang733 5 жыл бұрын
@@godhandgaming4480 Actually I have two comments, which make the game more complete.
@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
@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 5 жыл бұрын
This is simply a code that prevent random numbers from repeating. Do while I
@kerbydoblas7449
@kerbydoblas7449 8 жыл бұрын
somebody else who can help me plsss, help me
@mdcomputercenter2155
@mdcomputercenter2155 6 жыл бұрын
haha manage to do thay in visual basic 6.0, it is much easier
@polya1580
@polya1580 4 жыл бұрын
Можно код игры
@Fieldy6654
@Fieldy6654 12 жыл бұрын
awesome vid, but muted
@petercook932
@petercook932 9 жыл бұрын
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 9 жыл бұрын
+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
@k00mikhacking-gaming81
@k00mikhacking-gaming81 9 жыл бұрын
don't work ! :D
@bahez11
@bahez11 11 жыл бұрын
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
Tic Tac Toe Game In Visual Basic .NET
6:08
Daniel Bojchovski
Рет қаралды 22 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
13. Visual Basic Calculator  - Tutorial VB 2010
14:53
itsaji
Рет қаралды 73 М.
Game Loop and Key Input - How to Make a 2D Game in Java #2
34:48
How To Make A Simple Game In VB.NET
9:57
Roy Lucman
Рет қаралды 53 М.
Pre-Algebra Final Exam Review
1:56:08
The Organic Chemistry Tutor
Рет қаралды 326 М.
CompTIA Network+ Certification Video Course
3:46:51
PowerCert Animated Videos
Рет қаралды 9 МЛН
VB.Net TIC TAC TOE Full Tutorial
47:50
1BestCsharp blog
Рет қаралды 8 М.
ROMPECABEZAS EN VISUAL BASIC  ANGE OBREGON
14:49
ALUMNOS INSCOMERCIO
Рет қаралды 30 М.
How to Create Calculator in Visual Basic.Net Full Tutorial
12:31
10. Memory Game with Windows Forms! | Intro To C# Programming
36:02
Michael Hicks
Рет қаралды 114 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.